Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Measuring performance of binary code layout
2 points by dist1ll on Dec 5, 2022 | hide | past | favorite | 3 comments
What is the current state of things regarding binary code layout optimization?

I've watched a talk [1] on the Coz profiler, that asserted that code layout changes can have significant impact on performance.

My concrete questions:

- Are there recent (>2019) studies or papers discussing the effect of code layout on performance?

- Which tools can I use to inspect and alter code layout? Do I pass some flags to a linker or is there a specialized application for it?

[1] https://www.youtube.com/watch?v=r-TLSBdHe1A (relevant part starts at 10:00)



Is the actual constraint on your actual application actually CPU cycles?

Most applications are constrained by IO, network properties, or humans in the loop.

And most of those work well enough anyway.

Good luck.


Yes, I'm writing a high-throughput concurrent MPSC queue, so CPU cycles are absolutely the constraint.


Sorry. I am always skeptical when ‘performance’ is naked in the problem statement.

Buying a faster CPU might be the simplest thing that might work.

This is an engineering statement. I know it doesn’t provide the resources you want.

Have you looked at papers by the person in the video?

That should give you at least an idea if what they said was just word salad.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: