by jiusanzhou · 7mo ago · 0 comments
I’m basing that on the 1.6% improvement they got on speeding up sqrt. That surprised me, because, to get such an improvement, the benchmark must spend over 1.6% of its time in there, to start with.
Looking in the git repo, it seems that did happen in the nbody simulation (https://github.com/pizlonator/zef/blob/master/ScriptBench/nb...).
Basically the flow was:
- check if we’re calling a method of an object
- nope, ok, so cascade through 10+ symbol comparisons
- sqrt was towards the bottom of the cascade