nsf / pnoise

Perlin noise benchmark
77 stars 23 forks source link

Make main functions purely, avoid interfered factors. #16

Closed hackwaly closed 9 years ago

hackwaly commented 9 years ago

Such as random() and print(), These calls may spent different time result the comparation no sense.

nsf commented 9 years ago

I've seen removing print() calls gives 10-20ms difference. But it doesn't drastically change the results. Same with random(). I don't want to measure results up to the last millisecond and then microoptimize benchmarks. That's not the goal. The goal is to see how well compiled code performs after you've made the program as you would normally do so. I don't try to measure everything and do it accurately, just this particular algorithm and just for fun.

Don't take this "benchmark" too seriously.

hackwaly commented 9 years ago

You're right. Hope to see the ocaml version.