5 ms·
Could anyone explain the instructions/float metric ? Just tried running the same code on an M1 Air from blog, and i get quite different number of instructions/f
by mnadkvlb 6y ago
Could anyone explain the instructions/float metric ? Just tried running the same code on an M1 Air from blog, and i get quite different number of instructions/float, whereas the instructions/cycle are pretty close:
# parsing random numbers
model: generate random numbers uniformly in the interval [0.000000,1.000000]
volume: 10000 floats
volume = 0.0762939 MB
strtod 376.04 instructions/float (+/- 0.0 %)
75.53 cycles/float (+/- 0.0 %)
4.98 instructions/cycle
88.95 branches/float (+/- 0.0 %)
0.6005 mis. branches/float
fastfloat 162.01 instructions/float (+/- 0.0 %)
22.01 cycles/float (+/- 0.0 %)
7.36 instructions/cycle
38.00 branches/float (+/- 0.0 %)
0.0001 mis. branches/float
- liaukovv 6y agoI assume thats how many instructions it takes to parse one float?
- mnadkvlb 6y agothanks a lot, yea it makes sense. Edit: it seems weird when i think that on the blog it takes 490 instructions whereas in my case it takes 360. That is roughly 26% less instructions required than on blog. Instructions per cycle are more or less same on both results, telling me that my M1 Air is somehow using less instructions to run the same code (or is faster)
- liaukovv 6y agoMaybe you used different compiler configuration(or a different compiler altogether)
- tedd4u 6y agoI obtain nearly identical results to yours on my M1 MBA (16GB). Maybe his machine was swapping while running the benchmark?
- bredren 6y agoAuthor has posted an update matching these figures—-they were using an earlier build of their profiler https://lemire.me/blog/2021/03/24/counting-cycles-and-instructions-on-the-apple-m1-processor/#comment-580686 https://lemire.me/blog/2021/03/24/counting-cycles-and-instru...