Skip to content

Instantly share code, notes, and snippets.

@brixen
Created July 18, 2009 17:40
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 brixen/149629 to your computer and use it in GitHub Desktop.
Save brixen/149629 to your computer and use it in GitHub Desktop.
gauss:rubinius brian$ bin/rbx -r melbourne -r timeit -e 'timeit { i = 0; while i < 13158; a = :"aooentuhr#{i}"; i+=1; end }'
0.138461
gauss:rubinius brian$ bin/rbx -r melbourne -r timeit -e "timeit { i = 0; while i < 13158; a =
String.new('asentuhasesaearoeduarceduasodheuasoeudalrcdl9a8.lrcoduaosetudalroeudasoehtduasohtdeu'); i+=1; end }"
0.14672
gauss:rubinius brian$ bin/rbx -r melbourne -r timeit -e "timeit { i = 0; while i < 13158;
'asentuhasesaearoeduarceduasodheuasoeudalrcdl9a8.lrcoduaosetudalroeudasoehtduasohtdeu'.to_ast; i+=1; end }"
0.640346
gauss:rubinius brian$ bin/rbx -r melbourne -r timeit -e "timeit { i = 0; while i < 13158; FFI::MemoryPointer.new(0); i+=1; end }"
0.08301
gauss:rubinius brian$ bin/rbx -r melbourne -r timeit -e "timeit { i = 0; while i < 13158; ''.to_ast; i+=1; end }"
0.253896
gauss:rubinius brian$ bin/rbx -r melbourne -r timeit -e "timeit { i = 0; while i < 13158; ''.to_ast; i+=1; end }"
0.254183
gauss:rubinius brian$ bin/rbx -r melbourne -r timeit -e "timeit { i = 0; while i < 13158; 'a = 1'.to_ast; i+=1; end }"
0.642379
gauss:rubinius brian$ bin/rbx -r melbourne -r timeit -e "timeit { i = 0; while i < 13158; 'a = 1'.to_ast; i+=1; end }"
0.653146
gauss:rubinius brian$ bin/rbx -r melbourne -r timeit -e "timeit { i = 0; while i < 13158; 'a = 1'.to_sexp; i+=1; end }"
0.766912
gauss:rubinius brian$ bin/rbx -r melbourne -r timeit -e "timeit { i = 0; while i < 13158; 'a = 1'.to_sexp; i+=1; end }"
0.761192
gauss:rubinius brian$ bin/rbx -r melbourne -r timeit -e "timeit { i = 0; while i < 13158; 'a = 1'.to_ast; i+=1; end }"
0.638224
gauss:rubinius brian$ bin/rbx -r melbourne -r timeit -e "timeit { i = 0; while i < 13158; 'a = 1'.to_sexp; i+=1; end }"
0.769945
gauss:rubinius brian$ bin/rbx -r melbourne -r timeit -e "timeit { i = 0; while i < 13158; ''.to_sexp; i+=1; end }"
0.491314
gauss:rubinius brian$ bin/rbx -r melbourne -r timeit -e "timeit { i = 0; while i < 13158; ''.to_sexp; i+=1; end }"
0.489997
gauss:rubinius brian$ bin/rbx -r melbourne -r timeit -e "timeit { i = 0; while i < 13158; ''.to_sexp; i+=1; end }"
0.491003
gauss:rubinius brian$ bin/rbx -r melbourne -r timeit -e "timeit { i = 0; while i < 13158; Object.new; i+=1; end }"
0.052885
gauss:rubinius brian$ bin/rbx -r melbourne -r timeit -e "timeit { i = 0; while i < 13158; Object.new; i+=1; end }"
0.052165
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment