[Boulder Ruby Group] Anyone else see this?
Bruce Williams
bruce at codefluency.com
Sat Jun 30 02:15:21 EDT 2007
Tony,
Oh, yeah, definitely seen that before. Array#shift, etc in
ActiveSupport's Symbol#to_proc definitely seems to hurt for something
of this scale. I'm really looking forward to the native support we'll
see with 1.9.
Bruce
On 6/29/07, Tony Arcieri <tony at clickcaster.com> wrote:
> http://m.onkey.org/2007/6/30/let-s-start-with-wtf
>
> Just did my own little test...
>
> ~$ irb -rbenchmark -rubygems -ractive_support
> >> class Fixnum; def timestwo; self * 2; end; end
> => nil
> >> puts Benchmark.measure { (1..10000000).map { |n| n.timestwo } }
> 13.570000 0.100000 13.670000 ( 13.795564)
> => nil
> >> puts Benchmark.measure { (1..10000000).map(&:timestwo) }
> 48.370000 0.080000 48.450000 ( 48.517666)
> => nil
>
> Yikes
>
> --
> Tony Arcieri
> ClickCaster, Inc.
> tony at clickcaster.com
> _______________________________________________
> Bdrg-members mailing list
> Bdrg-members at rubyforge.org
> http://rubyforge.org/mailman/listinfo/bdrg-members
>
--
---
Bruce Williams
http://codefluency.com
More information about the Bdrg-members
mailing list