top | item 41469374

(no title)

whiteros_e | 1 year 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...

discuss

order

mikmoila|1 year ago

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.