Skip to content

Instantly share code, notes, and snippets.

View cdorrat's full-sized avatar

Cameron Dorrat cdorrat

  • Melbourne, Australia
View GitHub Profile
@cdorrat
cdorrat / mt-conj-impact.clj
Created December 9, 2012 07:15
Shows the impact of using conj with lists in multi-threaded env
;; This gist shows the performance impact of using conj (particularly with lists)
;; in multi-threaded environments
(ns thread-test.core
(:require [criterium [core :as c]]))
(defn fast-reverse [coll]
(reduce #(cons %2 %1) [] coll))
(defn vec-conj [coll]