Serdar Yegulalp
Senior Writer

Experimental JavaScript compiler shakes up ideas about speed, simplicity

news analysis
Sep 19, 20143 mins

Higgs, an experimental JavaScript engine written in D, uses novel approaches to speed up JavaScript -- and could inspire similar projects

An experimental new JavaScript compiler could provide useful lessons for the existing crop of JavaScript engines — or for as-yet-undeveloped JIT (just-in-time) compilers for other languages.

The Higgs compiler is written in the D language and is available under the BSD license. It was created by Maxime Chevalier-Boisvert as part of her doctoral research work in computer science at the Université de Montréal.

According to Chevalier-Boisvert, Higgs uses an architecture unlike those of other JIT compilers, such as Google’s V8 — the basis for Node.js — Mozilla’s SpiderMonkey, or Apple’s LLVM-backed FTLJIT project.

“[Those other engines] are all multitiered architectures,” Chevalier-Boisvert said in an email interview. “They incorporate multiple JIT compilers with different levels of optimization. The highest optimization level usually relies on type feedback and type analysis to extract type information. These type analyses can be very expensive in terms of running time and memory usage.”

Higgs, by contrast, uses a much smaller and simpler architecture with a single level of optimization and no type analysis as is conventionally implemented. Instead, type information is accumulated as machine-level code and is generated by the compiler.

Chevalier-Boisvert is hopeful that specific innovations in Higgs could find their way into other JavaScript compilers. One such innovation, lazy code generation — which compiles only the functions that actually run — already exists in some form in many JITs, but “that too could become more important in future JIT compilers.” At this point, Higgs is faster than V8 in certain cases, by Chevalier-Boisvert’s own analysis, though it’s still slower overall.

Some of Chevalier-Boisvert’s work with Higgs in D is reminiscent of an experimental approach Mozilla has been taking. Mozilla’s Rust language — approaching a 1.0 milestone — is being used to create a new browser engine and JavaScript compiler called Servo that benefits from the safety and inherent parallelism of Rust.

Chevalier-Boisvert was pleased to see new languages with a solid grounding in type theory applied to systems programming for the sake of safety. “C++ is an aging language with many issues,” she noted, “and it’s good that there are efforts to make a better replacement, such as Rust, D, and Nimrod.”

The plan with Higgs is not to explicitly create a replacement for existing JavaScript compiler technologies. Crucial pieces are still missing, said Chevalier-Boisvert, such as a robust garbage collection system. (Note: Higgs is written in D, which has issues with garbage collection that Chevalier-Boisvert has pinpointed in the past.) Rather, Chevalier-Boisvert’s stated intention is to stimulate new thinking about how JavaScript compilers can be created. “We’re trying something different,” she said.

Serdar Yegulalp

Serdar Yegulalp is a senior writer at InfoWorld. A veteran technology journalist, Serdar has been writing about computers, operating systems, databases, programming, and other information technology topics for 30 years. Before joining InfoWorld in 2013, Serdar wrote for Windows Magazine, InformationWeek, Byte, and a slew of other publications. At InfoWorld, Serdar has covered software development, devops, containerization, machine learning, and artificial intelligence, winning several B2B journalism awards including a 2024 Neal Award and a 2025 Azbee Award for best instructional content and best how-to article, respectively. He currently focuses on software development tools and technologies and major programming languages including Python, Rust, Go, Zig, and Wasm. Tune into his weekly Dev with Serdar videos for programming tips and techniques and close looks at programming libraries and tools.

More from this author