Hacker News new | ask | show | jobs
by nitrogen 4755 days ago
Just as an anecdote, in one of my university classes we had the assignment of writing and optimizing a memory allocator. When I switched from using structs to using pointer arithmetic in macros, I gained a significant performance boost, even though the in-memory data was exactly the same.
1 comments

were you compiling with optimizations on?
Yes, gcc -O2 on Opteron I believe (it was a while ago).