Specifically, Hermes is geared to fast startup, leveraging compact bytecode and ahead-of-time static optimization. In many cases, enabling Hermes will improve startup time, decrease memory usage, and result in smaller app size.
Hermes capabilities include:
- A small Android APK size.
- Bytecode can be memory-mapped and loaded from flash memory incrementally as needed.
- Virtual address space is allocated in chunks on demand as needed, avoiding the need to estimate the heap size and minimizing overhead. Freed memory can be returned to the OS. Also, garbage collection pauses are minimized.
Facebook has also open-sourced Hermes’ integration with React Native, so developers can opt into using Hermes immediately. The company plans to build time and memory profiling tools for Hermes and to add support for the Visual Studio Code debugging protocol.