use @FastNative annotation for Android to speed up JNI calls #1149
kaitian521
started this conversation in
Ideas
Replies: 1 comment
-
|
Thanks for your input. I didn't know about that annotation until now. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Let's talk about an interesting topic
https://developer.android.com/reference/dalvik/annotation/optimization/FastNative
========= my test ==========
when adding @fastNative, running duration is 915ms
when delete @fastNative, running duration is 1030ms
almost 10% speed up
so I just am curious about adding this annotation to speed up JNI calls for some special functions such as decodeX()
what's more, AOSP are using it, such as
https://github.com/aosp-mirror/platform_frameworks_base/blob/da436ad3e31f95eae922519ff1cbcf90b60900cb/core/java/android/os/Trace.java#L130
Thank you
Beta Was this translation helpful? Give feedback.
All reactions