Skip to content

Instantly share code, notes, and snippets.

@jasonroelofs
Created November 21, 2008 15:47
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 jasonroelofs/27467 to your computer and use it in GitHub Desktop.
Save jasonroelofs/27467 to your computer and use it in GitHub Desktop.
>> require 'benchmark'
=> true
>> Benchmark.measure { 1000000.times { a = /peoplel/}}.real
=> 0.199249029159546
>> Benchmark.measure { 1000000.times { a = Regexp.new("peoplel")}}.real
=> 4.74100685119629
>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment