Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Running such a lean startup you can't afford a function invocation?

This actually isn't as wildly hypothetical a situation as one might guess. At least in the Android world, "Avoid getters and setters" is on the short list of performance suggestions.

http://developer.android.com/guide/practices/design/performa...



Avoid internal getters and setters. This is a different issue vs. object to object getters and setters.


Ok, but in the general case (Sun/Oracle JDK) I'm pretty sure that there's almost no overhead for using an accessor anymore. That wasn't true of early JDKs though.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: