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
Loading
Please register or sign in to comment