Hermes is an open-source JavaScript engine developed by Meta and optimized for running React Native apps on Android and iOS. In mobile performance work, Hermes matters because it moves parsing and compilation from the phone to the build machine, shipping precompiled bytecode that starts faster and occupies less memory than source code interpreted at launch.
Hermes has been the default engine since React Native 0.70, replacing JavaScriptCore as the standard choice. Not to be confused with unrelated software projects that share the name.
How the Hermes engine executes JavaScript
Hermes executes JavaScript through ahead-of-time compilation to bytecode: during the app build, the Hermes compiler parses the JavaScript bundle, optimizes it and emits a compact Hermes bytecode file. At runtime the engine maps this file into memory and interprets it directly, so the device never spends time parsing source text on launch.
The design deliberately omits a just-in-time compiler. A JIT can make long-running code faster, but it costs memory for compiled machine code, adds warm-up time and is restricted on iOS for third-party engines. Hermes trades peak throughput for predictable startup and lower memory, a sensible exchange for interactive mobile apps where most code runs briefly.
The table below shows the main stages and where each one happens.
| Stage | Where it runs | Effect on the device |
|---|---|---|
| Parsing and compilation | Build machine | No parse cost at launch |
| Bytecode optimization | Build machine | Smaller, faster instruction stream |
| Bytecode loading | Device, memory-mapped | Pages load lazily as needed |
| Interpretation | Device | Steady performance without warm-up |
| Garbage collection | Device, mostly concurrent | Shorter pauses on the UI thread |
Performance effects on startup, memory and size
The clearest benefit of Hermes is shorter time to interactive, the interval between tapping the icon and being able to use the first screen. Because bytecode is ready to run and loaded on demand, apps with large bundles typically see noticeably faster cold starts, with the largest gains on low-end Android devices.
Memory use falls because the engine avoids holding both source text and JIT output, and because its Hades garbage collector performs most work concurrently with JavaScript execution. Reported improvements vary widely with bundle size and device class, so teams should measure on their own app rather than rely on published figures.
| Metric | Usual direction | What drives it |
|---|---|---|
| Cold start time | Lower | No parsing, lazy bytecode loading |
| Memory footprint | Lower | No JIT code cache, compact heap |
| Download size | Often lower | Smaller native library; bytecode may be larger than minified text |
| GC pause length | Lower | Concurrent Hades collector |
| Long compute loops | Sometimes slower | Interpretation without JIT |
Hermes compared with other JavaScript engines
Hermes occupies a different niche from browser engines, which are tuned for long sessions and heavy computation. The comparison below shows why React Native chose a specialized engine as its default.
| Engine | Compilation model | Typical strength |
|---|---|---|
| Hermes | Ahead-of-time bytecode, interpreter | Fast startup and low memory |
| JavaScriptCore | Interpreter plus JIT tiers where allowed | Mature, system engine on iOS |
| V8 | Interpreter plus optimizing JIT | High peak throughput |
| Static Hermes | Native code from typed JavaScript | Near-native speed for typed modules |
Static Hermes is an experimental evolution that can compile type-annotated code to native machine code. Its maturity and integration timeline remain uncertain, so production apps should treat it as an option to evaluate, not a guaranteed upgrade.
Adopting and profiling Hermes in a React Native app
In current React Native templates, Hermes is enabled by default, and older projects can turn it on through the hermesEnabled property in Gradle and the hermes_enabled option in the iOS Podfile. After switching, teams should rebuild native code completely and confirm the engine by checking global.HermesInternal at runtime.
- Profile with the Hermes sampling profiler and inspect traces in Chrome DevTools or Perfetto.
- Measure cold start on a low-end device, since gains are largest where CPU and storage are slow.
- Upload source maps to crash analytics so bytecode stack traces map back to readable code.
- Audit unsupported features such as
withstatements and certain locale behaviors before release.
The following table links common symptoms to likely causes when Hermes adoption does not go smoothly.
| Symptom | Likely cause | Typical fix |
|---|---|---|
| Unreadable crash stacks | Missing bytecode source maps | Compose and upload Hermes source maps |
| Slower heavy computation | No JIT for hot loops | Move work to native modules or workers |
| Date or Intl differences | Engine-specific locale support | Test formatting on target locales |
| Startup gain smaller than expected | Native initialization dominates | Profile native startup separately |
Limitations and trade-offs
The main limitation is lower peak performance for CPU-heavy JavaScript, such as image processing or large data transformations, where a JIT engine would optimize hot paths. Hermes also implements most but not all of recent ECMAScript, so libraries relying on rare features may need polyfills or alternatives.
Finally, Hermes speeds up only the JavaScript part of startup. Native module initialization, large images and network requests on the first screen remain separate bottlenecks, which is why Hermes works best combined with lazy loading and careful bundle design.
Debugging also changes. Because the shipped artifact is bytecode, readable stack traces depend on correct source maps, and a broken build step can leave production crash reports nearly useless. Teams that adopt Hermes should therefore treat source map generation and upload as a required release step, verified in continuous integration before every store submission, rather than an optional convenience added after the first incident.
Put simply
Many phone apps are written partly in JavaScript, a language the phone must translate before it can run it. Normally that translation happens every time the app opens. Hermes does the translation in advance, on the developer’s computer.
It is like receiving a book already translated instead of a dictionary and the original text. The phone can start reading right away. As a result, apps open faster and use less memory, especially on cheaper phones.
In practice
A team behind a React Native grocery delivery app noticed in Android vitals that cold starts on budget phones often exceeded four seconds. The app still used JavaScriptCore and shipped a JavaScript bundle of about 6 MB.
After upgrading React Native and enabling Hermes, the developers rebuilt both platforms, uploaded Hermes source maps to their crash reporting tool and measured startup on a two-year-old entry-level phone. Cold start time dropped by roughly a third, and peak memory on the home screen fell as well.
One screen that sorted thousands of products in JavaScript became slightly slower, so the team moved that sorting to the server. The release shipped with faster launches across the device range and no new crash categories.