Stay organized with collections
Save and categorize content based on your preferences.
dalvik.annotation.optimization
Annotations
CriticalNative |
An ART runtime built-in optimization for native methods to speed up JNI transitions:
Methods that are annotated with @CriticalNative use the fastest
available JNI transitions from managed code to the native code and back.
|
FastNative |
An ART runtime built-in optimization for native methods to speed up JNI transitions:
Compared to normal native methods, native methods that are annotated with
@FastNative use faster JNI transitions from managed code to the native code
and back.
|
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[null,null,["Last updated 2025-08-20 UTC."],[],[],null,["# dalvik.annotation.optimization\n\nAdded in [API level 34](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\ndalvik.annotation.optimization\n==============================\n\nAnnotations\n-----------\n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [CriticalNative](/reference/dalvik/annotation/optimization/CriticalNative) | An ART runtime built-in optimization for `native` methods to speed up JNI transitions: Methods that are annotated with @`CriticalNative` use the fastest available JNI transitions from managed code to the native code and back. |\n| [FastNative](/reference/dalvik/annotation/optimization/FastNative) | An ART runtime built-in optimization for `native` methods to speed up JNI transitions: Compared to normal `native` methods, `native` methods that are annotated with @`FastNative` use faster JNI transitions from managed code to the native code and back. |\n\n-\n\n Annotations\n -----------\n\n - [CriticalNative](/reference/dalvik/annotation/optimization/CriticalNative)\n - [FastNative](/reference/dalvik/annotation/optimization/FastNative)"]]