Higgs
Higgs is a Just-In-Time (JIT) compiler for JavaScript targeting the x86-64 platform. I am developing this compiler as part of my Ph.D. research work. It is a platform to explore new ideas in the realms of profiling, compilation and dynamic programming language optimization. Higgs is a research project, but my goal is for it to become mature enough to be useful in real-world applications as well.
The Higgs compiler is Open Source (BSD licensed). For those of you who would like to take a look at the source code, it is available in a public GitHub repository. There is also a Quickstart guide with installation instruction on the Higgs Wiki. The Higgs interpreter and JIT compiler are written in the D programming language. Most of the runtime and standard libraries are written in JavaScript and compiled by Higgs itself. I frequently blog about the workings and development of Higgs.
Some notable features of Higgs include:
- A self-hosted runtime written in extended JavaScript
- Lazy/incremental JIT compilation
- Context-driven versioning of basic blocks
- A Foreign Function Interface (FFI) system to interface with C code
- An interactive shell (REPL) with access to low-level primitives.
- A simple module system and a set of useful libraries.
Programs used to test the workings and performance of the Higgs VM include most of the SunSpider and V8 benchmark suites as well as a selection of benchmarks from the language benchmarks game. I’m interested in finding computationally-heavy JavaScript benchmarks that can run outside of a browser and haven’t been extensively optimized for in other JavaScript engines. If you would like to contribute code you’ve found or written yourself, please contact me.
Trackbacks & Pingbacks
- Higgs: My New Tracing JIT for JavaScript « Pointers Gone Wild
- Higgs has Exceptions « Pointers Gone Wild
- Higgs has a Garbage Collector « Pointers Gone Wild
- Visiting Mozilla « Pointers Gone Wild
- Back from Silicon Valley « Pointers Gone Wild
- A Simple JIT Compiler | Pointers Gone Wild
- Presented at DConf 2013 | Pointers Gone Wild
- Inlining in Higgs | Pointers Gone Wild
- How I miss you, dear SSA | Pointers Gone Wild
- Higgs: Rise of the SSA JIT | Pointers Gone Wild
- Down the Rabbit Hole that is Inlining | Pointers Gone Wild
- Higgs: the First JIT Compiler of its Kind | Pointers Gone Wild
- Contribute to the Higgs JS Compiler | Pointers Gone Wild
- asm.js AOT compilation and startup performance | Luke Wagner's Blog
- Positive Results for Higgs | Pointers Gone Wild
- The Constness Problem | Pointers Gone Wild
- Dogfooding Higgs with the Turing Turtle | Pointers Gone Wild
- D’s Garbage Collector Problem | Pointers Gone Wild
- Faster than V8 * | Pointers Gone Wild
- Experimental JavaScript compiler shakes up ideas about speed, simplicity | MyFamilyWay.com
- Experimental JavaScript compiler shakes up ideas about speed, simplicity | NerdlyNews
- Circumventing the D Garbage Collector | Pointers Gone Wild
- The Fastest For-In Loops in the Whole Wide Web | Pointers Gone Wild
- Дайджест событий из мира D | FNIT.RU
One of my favorite features in .NET/Mono is the ability to use DllImport method attribute so you can call native code from third party libraries on-the-fly. On the other hand, most of the other dynamic/managed programming languages require some special “glue” code (C or C++) to support third party libraries.
I don’t know if you plan to support something like this, but it would be very practical and useful to have it.
We’re working on a Foreign Function Interface (FFI) API right now. The end result should be similar to what node.js and LuaJIT have. We’d like to provide pre-made bindings to commonplace libraries such as file access, sockets and OpenGL. Bindings you can load in one line of code and use immediately.