Skip to content

Instantly share code, notes, and snippets.

@sunng87
Created February 14, 2012 05:44
Show Gist options
  • Save sunng87/1823954 to your computer and use it in GitHub Desktop.
Save sunng87/1823954 to your computer and use it in GitHub Desktop.
Evaluating clojure literals in ruby and python
import clj
import time
s = "[1 2 3 true false nil {:a 21.3 :b 43.2} \"Hello\"]"
t1 = time.time()
for i in range(10000):
clj.loads(s)
print time.time()-t1
require 'clj'
s = "[1 2 3 true false nil {:a 21.3 :b 43.2} \"Hello\"]"
t1 = Time.now()
for i in 0...10000
Clojure.parse(s)
end
puts Time.now()-t1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment