Skip to content

Instantly share code, notes, and snippets.

@sstephenson
Created November 7, 2010 03:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sstephenson/665943 to your computer and use it in GitHub Desktop.
Save sstephenson/665943 to your computer and use it in GitHub Desktop.
require "coffee-script"
require "benchmark"
Benchmark.bmbm do |x|
x.report("evaluate") do
100.times { CoffeeScript.evaluate "a = 1" }
end
end
~/Projects/ruby-coffee-script(master)% ruby bench.rb
Rehearsal --------------------------------------------
evaluate 0.010000 0.100000 14.490000 ( 14.767549)
---------------------------------- total: 14.490000sec
user system total real
evaluate 0.010000 0.130000 14.540000 ( 14.903688)
~/Projects/ruby-coffee-script(master)% git checkout v8
Switched to branch 'v8'
~/Projects/ruby-coffee-script(v8)% ruby bench.rb
Rehearsal --------------------------------------------
evaluate 0.290000 0.040000 0.330000 ( 0.322984)
----------------------------------- total: 0.330000sec
user system total real
evaluate 0.170000 0.020000 0.190000 ( 0.185008)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment