Bare Metal Clojure with clojure.Spec

Clojure provides powerful abstractions and dynamic typing, and its high performance is enabled only through the amazing optimizations provided by the powerful JITs in JVM, V8 et al. Using Clojure's new spec and gen features, it's possible to generate specialized versions of Clojure code for constrained specifications, eliminating much of the boilerplate and branch heavy code, which can then be translated into efficient C. This talk follows optimization of the humble (fn fib [n]) in its most naive form, using a series of generally applicable techniques to transform it from a O( 2n ) to a O( log n ) algorithm, generating efficient C that would be difficult to match by hand.
Length: 36:08
Views 1675 Likes: 25
Recorded on 2016-10-25 at Euro Clojure
Look for other videos at Euro Clojure.
Tweet this video