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

> When could an app NOT be agnostic to this

When the app has a custom memory allocator, the allocator might have hardcoded the page size for performance. Otherwise you have to load a static variable (knocks out a cache line you could've used for something else) and then do a multiplication (or bit shift, if you assume power of 2) by a runtime value instead of a shift by a constant, which can be slower.

No idea if Android apps are ever this performance sensitive, though.



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

Search: