>  Looks like they're pretty close perf wise, though mine is a little
>  faster. Eval is usually a hit. Measurement from running
>  http://p.caboo.se/183556

Ah, and theirs is faster in the error case (and especially the one the
regex catches):

Odysseus:Desktop kev$ ruby constantize_bench.rb
Constantizing Foo::Bar::NotThere
with kevs
  0.350000   0.020000   0.370000 (  0.362751)
  0.340000   0.010000   0.350000 (  0.363763)
  0.350000   0.020000   0.370000 (  0.363941)
  0.350000   0.020000   0.370000 (  0.363537)
  0.340000   0.010000   0.350000 (  0.361070)
with rails
  0.330000   0.030000   0.360000 (  0.350830)
  0.320000   0.030000   0.350000 (  0.351460)
  0.320000   0.030000   0.350000 (  0.350897)
  0.320000   0.030000   0.350000 (  0.351069)
  0.320000   0.030000   0.350000 (  0.350705)
Constantizing Foo::Bar::bad_name
with kevs
  0.340000   0.010000   0.350000 (  0.353555)
  0.330000   0.020000   0.350000 (  0.351792)
  0.330000   0.020000   0.350000 (  0.352263)
  0.340000   0.010000   0.350000 (  0.351204)
  0.330000   0.020000   0.350000 (  0.354390)
with rails
  0.240000   0.020000   0.260000 (  0.259200)
  0.240000   0.020000   0.260000 (  0.256816)
  0.240000   0.010000   0.250000 (  0.255323)
  0.240000   0.020000   0.260000 (  0.254019)
  0.240000   0.010000   0.250000 (  0.255987)



-- 
Kevin Clark
http://glu.ttono.us

--~--~---------~--~----~------------~-------~--~----~
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
-~----------~----~----~----~------~----~------~--~---

Reply via email to