What Hermes is fast at, and what it isn't
React Native doesn't run your JavaScript on V8 or JavaScriptCore. It runs it on Hermes, an engine Meta built for phones. I'd read the claims, fast startup and low memory, but never seen numbers on code that looks like an app's, next to an engine I know. So I built the exact Hermes that React Native 0.88 ships and ran the same scripts on it and on Node. The short version: Hermes starts in a…
Hermes is an engine developed by Meta for running JavaScript on mobile devices. It was built as a faster alternative to the standard JavaScript engines, like V8 and JavaScriptCore, used in React Native apps. React Native ships with Hermes, which offers faster startup times and lower memory usage compared to V8, allowing for smoother performance in many cases.
However, Hermes does not utilize a Just-In-Time (JIT) compiler, which V8 does, thus it runs slower than V8 in most other scenarios. Hermes performs best when startup time is critical, and memory usage is a concern, such as in large app bundles. However, for heavy computations that involve complex operations like regex replacements, Hermes lags behind V8 significantly.
The bytecode generated by Hermes is also larger than its source code counterpart, which could result in increased download sizes for apps.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.