koorchik / formula-evaluation-benchmark

Benchmark math formula (AST) evaluation in different languages
5 stars 10 forks source link

scala: ideomatic and optimized versions #5

Closed luben closed 9 years ago

luben commented 9 years ago

Written as executable scripts. Tested with Scala-2.11.2

luben commented 9 years ago

Though it is not measuring the raw performance because the JIT takes time. If I execute one 100000 iterations loop before the measurement (in order to force the JIT) then 100000 iterations is too short to reliably conclude about the performance (less than 10ms)

koorchik commented 9 years ago

I am not sure that it does not use some kind of memoization.

luben commented 9 years ago

It does not memoize unless explicitly asked.