by arrdem

arrdem / oxcart

[ABANDONED] An optimizing Clojure compiler

126 Stars 2 Forks Last release: Not found Eclipse Public License 1.0 325 Commits 27 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

Project Oxcart

Then, I heard it. The click of the mic button from the back seat. Very professionally, and with no emotion, Walter spoke: "Los Angeles Center, Aspen 20, can you give us a ground speed check?" There was no hesitation, and the replay came as if was an everyday request. "Aspen 20, I show you at one thousand eight hundred and forty-two knots, across the ground."

–– Brian Schul, "Sled Driver: Flying the World's Fastest Jet"

—– http://oppositelock.jalopnik.com/favorite-sr-71-story-1079127041

Oxcart is a prototype Clojure compiler which seeks to provide aggressive AOT compilation for performance and memory usage. At present Oxcart is a holding tank for changes which will likely be split up between tools.emitter.jvm, tools.analyzer.jvm and some future


Oxcart is currently on indefinite hiatus, pending changes to Clojure addressing the current

 behavior of loading
clojure/core from source. See the blog posts for more information.

Blog Posts

Stuff I read prior to starting Oxcart

Oxcart posts


The script "bench.sh" in the root of the Oxcart project is designed to run the various Oxcart benchmarks with minimal effort. Usage is

bench.sh NS
is the namespace in the Oxcart source tree to be run as a benchmark. That namespace will be loaded first with Clojure 1.6, and then compiled & run via Oxcart. Runs are wraped in
invocations, although several benchmarks do their own timing internally.



bash bench.sh test.call

This namespace is designed to assess the cost of making function calls between Oxcart and core Clojure. It repeatedly invokes the

function to perform primitive arithmetic and is intended to measure the speedup from eliminating var indirection on



bash bench.sh test.hello

This namespace just prints "Hello, World" as a test. Not actually a benchmark, unless you want to measure how long it takes to boot a Clojure instance, do minimal work and exit.



bash bench.sh test.load

This namespace loads a slightly modified version of

, except that all the vars but
are unreachable. This is intended as a demonstration of how slow it is to compile programs from source compared to loading them from compiled classes.



bash bench.sh test.vars

This namespace defines 502 functions, most of which are trivial, and then calls a random set of them in a tight loop. This is also designed to stress the costs of var indirection as the tight loop function is much too large to reasonably inline across and the set of vars called in each iteration is random on each pair of possible functions which kills the branch predictor and increases the inlining cost.


Copyright © 2014 Reid McKenzie, Rich Hickey & contributors.

Distributed under the Eclipse Public License, the same as Clojure.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.