←back to thread

207 points mfiguiere | 1 comments | | HN request time: 0.212s | source
Show context
nightpool ◴[] No.43540125[source]

    [Speculative optimizations] may not suffice in this case as future planned optimizations may wish to rely not only on immutability within the lifetime of the process, but also on the immutability of fields from one run of the application to the next.
Can someone elaborate a little more on what this means? I'm very surprised to hear that this was considered a blocker important enough to add all of this complicated machinery (and breaking several deserialization libraries...), when I've never even heard of such an optimization and can't imagine what sort of form it would take
replies(3): >>43540170 #>>43540492 #>>43540608 #
1. xxs ◴[] No.43540608[source]
This is rather old[0] but still relevant.

Surprise #2! A popular open-source framework writes to final fields after object construction via generated bytecodes!... This optimization of the final field is *the* main optimization performed on final fields.

[0] https://web.archive.org/web/20121016082428/http://www.azulsy...