3 ms·
Another good example why premature optimization is usually counterproductive. I really like the use of the assembly comparisons to check and prove assumptions.
by bombcar 6y ago
Another good example why premature optimization is usually counterproductive.
I really like the use of the assembly comparisons to check and prove assumptions.
- mhh__ 6y agoThe disassembly can lie, however, i.e. the CPU can do a lot of work in the time a cache miss takes (or some other dependency induced stall, or misprediction) - you have to measure it, in the situation where the code is actually being used (i.e. contrived benchmarks will again often lie as they usually don't fill the cache, and are easy to predict)
- guerrilla 6y agoYeah, I was actually wondering if maybe gcc did that second one with floats on purpose because of profiling data that they have.