Live data from Hacker News

Ubuntu 24.04 LTS will enable frame pointers by default

ubuntu.com

11–20 of 121 posts

Re: Ubuntu 24.04 LTS will enable frame pointers by default

#14
Even in context it is hard to understand this: "The performance wins that these can provide far outweigh the comparatively tiny loss in performance."

My guess is that on average the potential performance discovered with the techniques this enables is higher than the guaranteed negligible performance loss.

Re: Ubuntu 24.04 LTS will enable frame pointers by default

#17
post #15

hmm.. I wonder if the 10% performance regression in python has been resolved. https://discuss.python.org/t/python-3-11-performance-with-fr...

We’re waiting on the benchmarks once the archive has been rebuilt to double check if we’ll be affected in that way, but if indeed we do find that sort of regression, we’ll exclude Python from this change (and any other package where there is a substantial hit).

Re: Ubuntu 24.04 LTS will enable frame pointers by default

#18
post #14

Even in context it is hard to understand this: "The performance wins that these can provide far outweigh the comparatively tiny loss in performance." My guess is that on average the potential performance discovered with the techniques this enables is higher than the guaranteed negligible performance loss.

Yes, that's correct.

Re: Ubuntu 24.04 LTS will enable frame pointers by default

#20

For the layman, what does this mean?

I was going to write a long essay about the relation between C and assembly but after thinking for a while, I think there is an easier way to explain it.

Stack frames are basically a (single) linked list of information about the call stack. Every frame corresponds to one function call, and says where the local variables are stored, and where the function should return after it has finished.

The head of this list is stored in a register (a scarce resource, superfast memory). So to use frame pointers, you have to spend one register, and also every function has to do some work to maintain the linked list. Two instructions worth of work when the function is enterred, and one when it exits.

The alternative to doing this explicitly is to keep track of it all implicitly which is faster but a bit more complex.

Post reply on HN