Tech does not just watch: Take action against Russia’s war on Ukraine 🇺🇦, and take action against Israel’s occupation, destruction, and ethnic cleansing of Palestine (history) 🇵🇸 Hide

Frontend Dogma

JavaScript Engines Explained—Comparing V8, SpiderMonkey, JavaScriptCore, and More

by @eleanorhecks.bsky.social (@designerly.bsky.social) on , tagged , , , , (share this post, e.g. on Mastodon or on Bluesky)

JavaScript powers much of the modern Web, running behind the scenes in mobile apps, smart devices, and even IoT systems. JavaScript engines enable this versatility by translating code into machine-executable instructions.

Understanding how these engines differ is essential for developers who want to optimize JavaScript performance, avoid sluggish user experiences and choose the best tools for speed, scalability, and seamless interactions.

1. V8

V8 is Google’s open-source JavaScript engine used in Chrome, Microsoft Edge, Node.js and Deno. It makes web apps faster and more responsive.

V8 works by starting code in an interpreter called Ignition, then upgrades hot code paths with an optimizing just-in-time compiler known as TurboFan. It also uses a generational, incremental concurrent garbage collector to reclaim memory without long pauses. In practice, this means short startup plus strong peak speed.

Strengths at a glance:

Best-fit use cases:

2. SpiderMonkey

JavaScript runs on about 98.9% of all websites, putting browser engines like SpiderMonkey at the center of the Web. SpiderMonkey is Mozilla’s open-source JavaScript and WebAssembly engine that powers Firefox and several other Mozilla projects.

SpiderMonkey uses a baseline interpreter plus multiple JIT tiers—from IonMonkey to WarpMonkey—and a garbage collector tuned for general browser workloads. It is embeddable in other apps and closely follows the ECMAScript specs.

Strengths at a glance:

Best-fit use cases:

3. JavaScriptCore

JavaScriptCore is Apple’s JavaScript engine, built into WebKit and used by Safari and iOS or macOS web views. The JavaScriptCore framework also exposes it to native apps, so developers can run JS inside Swift or Objective-C programs.

JSC evolved from the SquirrelFish family into a multi-tier runtime with bytecode and optimizing JIT stages. Recent WebKit improvements introduced a new bytecode format that significantly cuts memory use, streamlining runtime efficiency on constrained devices.

Strengths at a glance:

Best-fit use cases:

4. QuickJS

With roughly 64% of U.S. smart-speaker owners using Amazon Echo devices, demand for compact engines running on IoT hardware is growing, and QuickJS fits that niche. QuickJS is a tiny, embeddable JavaScript engine created by Fabrice Bellard. Its ability to run modern JavaScript in small footprints makes it popular for scripting inside devices and lightweight apps.

QuickJS is an interpreter that can also compile to small bytecode or executables. The implementation is deliberately small—a few C files—and fast to start, while supporting ES2020 and ES2023-level features such as modules, async generators, proxies, and BigInt. That design keeps binary size and memory use low, making QuickJS easy to embed in constrained environments.

Strengths at a glance:

Best-fit use cases:

5. Chakra

Chakra was Microsoft’s JavaScript engine for Edge Legacy and several Windows hosts. After Edge moved to Chromium in 2020, Chakra’s role in mainstream browsers shrank. Today, Edge accounts for approximately 5% of the global browser market share, which explains why Chakra is mostly a legacy concern for browser authors.

Microsoft now provides ChakraCore, its open-source, embeddable build descendant. ChakraCore is still a valuable tool for developers when they need to host the engine outside the browser. However, release downloads became unavailable in 2024, so the project no longer ships new releases as it once did.

Strengths at a glance:

Best-fit use cases:

6. Hermes

Hermes is a small, mobile-first JavaScript engine built by Meta for React Native. With 63% of the world’s Internet traffic coming from mobile devices, optimizing for startup speed, memory, and app size is critical. Hermes is the perfect solution to meet those mobile needs.

Hermes uses ahead-of-time compilation to convert JavaScript into bytecode at build time. That means apps skip expensive parsing and compilation at launch, shortening cold-start times and reducing runtime overhead. Hermes also applies runtime optimizations tuned for low memory usage and smaller binary sizes.

Strengths at a glance:

Best-fit use cases:

Differences Between JavaScript Engines

Here is a breakdown of the noteworthy trade-offs between engines.

V8—Chrome, Edge, Node.js, Deno

SpiderMonkey—Firefox

JavaScriptCore—Safari, WebKit, iOS, macOS

QuickJS—Embedded and IoT Devices

Chakra—Legacy Edge, Windows Hosts

Hermes—React Native, Mobile

Choose the Proper Engine for the Job

JavaScript engines do the heavy lifting behind thousands of webpages, apps, and devices. Picking the correct one comes down to a few simple trade-offs. For instance, you might use V8 for raw execution speed, while SpiderMonkey is better for standards and tooling. It all depends on your project. Test real workloads on your target devices, measure startup time, memory, and user performance, then choose the engine that meets those needs.

(Frontend Dogma accepts guest posts as long as they aren’t predominantly AI-generated or promotional. Although guest posts are being reviewed, Frontend Dogma cannot and does not vouch for their accuracy, and does not necessarily endorse recommendations made in them.)