4 ms·
Hand written 294 lines vs. gcc -O3 526 lines. https://godbolt.org/z/yEcMKf https://godbolt.org/z/yEcMKf At a first glance, it seems the compiler version is bet
by alecco 7y ago
Hand written 294 lines vs. gcc -O3 526 lines. https://godbolt.org/z/yEcMKf https://godbolt.org/z/yEcMKf
At a first glance, it seems the compiler version is better at hiding the latency of some of the div instructions. It might be hiding memory access latency, too. But that's more involved analysis.