Callstack Apr 21, 2021

Hermes JavaScript Engine Performance on iOS

Article Summary

Callstack brings Hermes to iOS with React Native 0.64, ending Android's monopoly on this performance-focused JavaScript engine. The results challenge assumptions about cross-platform optimization.

Hermes, Facebook's lightweight JavaScript engine originally built for Android, is now available on iOS as of React Native 0.64. Callstack published this technical breakdown in April 2021, examining real-world performance impacts when Hermes runs on Apple platforms.

Key Takeaways

Critical Insight

Hermes on iOS delivers measurable performance gains through AOT compilation and reduced memory usage, making it a viable alternative to JavaScriptCore for React Native apps.

The article hints at specific compilation challenges that made iOS support more complex than the original Android implementation.

About This Article

Problem

React Native developers wanted a faster JavaScript engine for iOS that could match what Android offered. Hermes wasn't available on Apple platforms, so teams couldn't optimize their apps the same way across both systems.

Solution

Callstack built Hermes for iOS by working around Apple's platform limitations. They created custom build processes that enabled bytecode precompilation and ahead-of-time compilation, adapted to work with Apple's architecture.

Impact

Hermes on iOS uses less memory than JavaScriptCore. React Native developers now have a real performance option that works the same way on both Android and iOS.