dcsobral/scala — comment on commit 232e81b7daac9d90fb7532b9d6ea8ef7a4ceb1ab
File:  line 0
By dcsobral:

Sample times

patched, -optimise
[info] length benchmark ns linear runtime
[info] 10 Foreach 102.02 =
[info] 100 Foreach 173.37 =
[info] 1000 Foreach 840.66 ===
[info] 10000 Foreach 7601.37 ==============================

unpatched, -optimise
[info] 0% Scenario{vm=java, trial=0, benchmark=Foreach, length=10} 99.47 ns; σ=3.09 ns @ 10 trials
[info] 25% Scenario{vm=java, trial=0, benchmark=Foreach, length=100} 199.47 ns; σ=3.36 ns @ 10 trials
[info] 50% Scenario{vm=java, trial=0, benchmark=Foreach, length=1000} 945.59 ns; σ=20.99 ns @ 10 trials
[info] 75% Scenario{vm=java, trial=0, benchmark=Foreach, length=10000} 8737.33 ns; σ=145.31 ns @ 10 trials

patched, no -optimise
[info] 0% Scenario{vm=java, trial=0, benchmark=Foreach, length=10} 112.27 ns; σ=2.31 ns @ 10 trials
[info] 25% Scenario{vm=java, trial=0, benchmark=Foreach, length=100} 196.87 ns; σ=4.45 ns @ 10 trials
[info] 50% Scenario{vm=java, trial=0, benchmark=Foreach, length=1000} 957.87 ns; σ=18.19 ns @ 10 trials
[info] 75% Scenario{vm=java, trial=0, benchmark=Foreach, length=10000} 8827.24 ns; σ=25.86 ns @ 3 trials

unpatched, no -optimise
[info] 0% Scenario{vm=java, trial=0, benchmark=Foreach, length=10} 113.29 ns; σ=2.46 ns @ 10 trials
[info] 25% Scenario{vm=java, trial=0, benchmark=Foreach, length=100} 201.25 ns; σ=5.74 ns @ 10 trials
[info] 50% Scenario{vm=java, trial=0, benchmark=Foreach, length=1000} 1007.64 ns; σ=4.89 ns @ 3 trials
[info] 75% Scenario{vm=java, trial=0, benchmark=Foreach, length=10000} 8677.37 ns; σ=138.98 ns @ 10 trials

These sample times are fairly representative of multiple runs. Source code at https://github.com/dcsobral/scala-benchmarking-template.