4 ms·
Yeah, it's hardly a benchmark. The information what kind of CPU they are using is also missing (why no -march=native?). Despite how unbelievable it looks, I wo
by mbel 10y ago
Yeah, it's hardly a benchmark. The information what kind of CPU they are using is also missing (why no -march=native?).
Despite how unbelievable it looks, I would love to see contents of the final binary to see what is really happening there. gcc code looks quite alright in this case: https://godbolt.org/g/R6iBup https://godbolt.org/g/R6iBup
- gus_massa 10y agoMy totally unsupported guess is that they detect pure functions and add implicit memoization. It is relative easy to implement, has good benchmark times if N is big enough but not too big to make the trick obvious, but under the hood it use more memory than you expected.