Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 603282be authored by felkachang's avatar felkachang
Browse files

Benchmark throwing NPE between CriticalNative vs. FastNative

CriticalNative can't throw a NPE in native layer since JNIEnv isn't
accessible. FastNative can throw a NPE description in native layer.
It means that moving the affair from native layer to java layer is
the major effect of changing from FastNative to CriticalNative.

When an application wants to change the usage of FastNative to
CriticalNative. It needs the proof, metrics, impact for the following:
* throwing an exception in java or native layer.
    Experiment result for throwing an exception:
        FastNative:     ~4000 ns throw an exception in native layer
        CriticalNative: ~3000 ns throw an exception in java layer
* checking the condition in java or native layer.
    Experiment result for checking:
        FastNative:     ~12 ns to check the number in native layer
        CriticalNative:  ~6 ns to check the number in java layer

Bug: 173709508

Test: atest CorePerfTests:android.perftests.SystemPerfTest
Change-Id: Ifdbe0e9db881e0a21ec429844538e7166e558ac4
parent fe8bf190
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment