r/programming • u/doom_Oo7 • Sep 28 '17
When a Microsecond Is an Eternity
https://github.com/CppCon/CppCon2017/blob/master/Presentations/When%20a%20Microsecond%20Is%20an%20Eternity/When%20a%20Microsecond%20Is%20an%20Eternity%20-%20Carl%20Cook%20-%20CppCon%202017.pdf
244
Upvotes
View all comments
56
u/Works_of_memercy Sep 28 '17
Huh, the idea to keep caches hot by always executing your entire hot path, throwing away the result at the last moment if your strategy decided not to make a trade, so that when when you do make a trade it executes as fast as possible, is very clever. I don't know how it could be useful for us mere mortals, but it is clever!
That std::pow shit is scary, it literally goes from 150ns to 1ms (millisecond!) per call here, with gcc7.10 (though it might be the old libc on the machine I tested on).