react-native-v8 icon indicating copy to clipboard operation
react-native-v8 copied to clipboard

Performance: V8 JSI calls are 4-6 times slower than Hermes/JSC (iOS)

Open ammarahm-ed opened this issue 1 year ago • 3 comments

Hey Kudo, I have been doing some testing to check v8 JSI performance compared to Hermes/JSC and I have found out that it's 4-6 times slower than Hermes/JSC. The issue seems to be related to the V8 JSI implementation rather than a v8 issue.

All benchmarks below were run on the same iPhone 6S device.

React Native v8 JSI: v8

Pure v8 (v10.x) calls vs v8 JSI in a NativeScript app take only 200ms: rn_image_picker_lib_temp_e2f353e5-1964-4cef-8203-6f74b1690ed5

JSC JSI (Fastest of all): rn_image_picker_lib_temp_ee3d89fd-9329-4de1-926e-1931eb5c0f52

Hermes JSI:

 LOG  Running "ReactNative" with {"fabric":true,"initialProps":{"concurrentRoot":true},"rootTag":1}
 LOG  318.93000000715256 ms (Primitives)
 LOG  353.515625 ms (Strings)
 LOG  3873.240542009473 ms (Big data marshalling)
 LOG  272.34741701185703 ms (Strings with arraybuffer)
 LOG  890.5701670050621 ms (Big data marshalling with arr

Repro Expo Sample: https://github.com/ammarahm-ed/v8-jsi-benchmarks-ios

The issue might be related to: https://github.com/Kudo/react-native-v8/issues/179

ammarahm-ed avatar Jul 05 '23 15:07 ammarahm-ed