As per Google, switching to 16 KB pages brings performance benefits:
App launch speed improved by 3–30%
Battery savings of around 4.5%
Camera starts accelerated 4.5–6.6%
System boots up faster by roughly 8%
The first thing that we need to understand is that this 16 KB page size optimization applies only to native code (NDK code) in Android apps, that is, the code written in C or C++ and compiled into .so libraries.
So, if you have code written in C or C++ or using some libraries that have C or C++ code compiled into .so libraries, then you will have to consider this 16 KB page size for the optimization.
There is NO impact on Java/Kotlin Code.
What you need to do if you have native code:
If using NDK, use the latest NDK with support for 16 KB pages.
If using prebuilt native SDKs, update them with support for 16 KB pages.
Avoid hardcoding page size. Use sysconf(_SC_PAGESIZE) to get page size at runtime.
Test on both 4 KB and 16 KB devices.
That’s it for now.
Keep Learning, Keep Sharing, and Keep Growing.
Thanks
Amit Shekhar
Founder, Outcome School