4 ms·
I've previously had problems with the compiler not inlining / eliding instructions solely due to profiling code (see a blog post: https://www.jackyoustra.com/bl
by JackYoustra 2y ago
I've previously had problems with the compiler not inlining / eliding instructions solely due to profiling code (see a blog post: https://www.jackyoustra.com/blog/llama-ios#-bug-bug-slowdown-bug https://www.jackyoustra.com/blog/llama-ios#-bug-bug-slowdown...). I wonder if it's that?
(I've also always had a sneaking suspicion I did something wrong in my example, so if anyone knows let me know)
- vlovich123 2y agoPcwalton’s explanation is much more likely to be correct https://news.ycombinator.com/context?id=41830704 https://news.ycombinator.com/context?id=41830704 Profiling native code with optimizations on is very very tricky.
- JackYoustra 2y agoAgree, seems like a more likely culprit in this case.
- mwkaufma 2y agoWhat's the point of profiling for performance without optimizations if it leads you where the OP winds up hand rolling the same transformations?
- JackYoustra 2y agoUsually a terrible idea (imo) to profile without optimizations, I think the point is profiling with optimizations is tricky (without much better alternative).