Skip to content

Instantly share code, notes, and snippets.

@baburdick
Created January 14, 2011 01:17
Show Gist options
  • Save baburdick/778981 to your computer and use it in GitHub Desktop.
Save baburdick/778981 to your computer and use it in GitHub Desktop.
time ruby -X+O -e "h=[]; 10000.times {|n| h = [n,n*n]}; c=0; ObjectSpace.each_object {|o| c+=1 }; puts c; GC.start; c=0; ObjectSpace.each_object {|o| c+=1 }; puts c; puts h.inspect"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment