bench-rejected-impls/18_operation_order.rb
# term_ltr and term_rtl are exactly alike,
# other than which of op_expr_ltr and op_expr_rtl they call
# (and that term_ltr also needs to pass a block)
# Could have pass it in as a symbol and using send but it caused unnecssary slowdown,
# which made benchmark unfair.
term_ltr and term_rtl are exactly alike,
other than which of op_expr_ltr and op_expr_rtl they call
(and that term_ltr also needs to pass a block)
Could have pass it in as a symbol and using send but it caused unnecssary slowdown,
which made benchmark unfair.
term_ltr and term_rtl are exactly alike other than which of op_expr_ltr and op_expr_rtl they call ( and that term_ltr also needs to pass a block ) Could have pass it in as a symbol and using send but it caused unnecssary slowdown which made benchmark unfair .
def term_ltr(expr, pos, op_groups, verbose: false)
  case c = expr[pos]
  when ?(
    v, close_paren = op_expr_ltr(expr, pos + 1, op_groups, op_groups, verbose: verbose, &:itself)
    raise "#{close_paren} was #{expr[close_paren]} not close paren" if expr[close_paren] != ?)
    [v, close_paren + 1]
  when /\d/
    [Integer(c), pos + 1]
  end
end
def term_ltr ( expr , pos , op_groups , verbose : false ) case c = expr [ pos ] when ?( v , close_paren = op_expr_ltr ( expr , pos + 1 , op_groups , op_groups , verbose : verbose , & :itself ) raise "#{close_paren} was #{expr[close_paren]} not close paren" if expr [ close_paren ] != ?) [ v , close_paren + 1 ] when / \d / [ Integer ( c ) , pos + 1 ] end end
term_ltr and term_rtl are exactly alike,
other than which of op_expr_ltr and op_expr_rtl they call
(and that term_ltr also needs to pass a block)
Could have pass it in as a symbol and using send but it caused unnecssary slowdown,
which made benchmark unfair.
term_ltr and term_rtl are exactly alike other than which of op_expr_ltr and op_expr_rtl they call ( and that term_ltr also needs to pass a block ) Could have pass it in as a symbol and using send but it caused unnecssary slowdown which made benchmark unfair .
expr
<not_specific>
pos
<not_specific>
op_groups
<not_specific>
verbose
<not_specific>