Hacker News new | ask | show | jobs
by whiteros_e 646 days ago
I've read somewhere that because of these getter setter patterns, JVM authors had to optimise their JIT to detect and inline those.

Related discussion on SO: https://stackoverflow.com/questions/37109924/if-getter-sette...

1 comments

There is nothing special in getters and setters, the runtime sees them as methods and may optimize them as it'd do for any other methods.