>
>    I see two ways of fixing the bug,
>>
>>      1. removing the [RubyMethod("count")] declaration from
>> IListOps.Length which would make count inefficent on IList's.
>>      2. reimplementing the object and block variations of count in
>> IListOps
>>
>> In my humble opinion, 1 would be best, but since this is my first
>> change I'd thought I'd get some input.
>>
>>
> I'm partial to option 2. As Ruby is already a slow language, we should try
> to optimize it wherever possible. In addition, 2 keeps to the trend in other
> .NET languages. For example, I believe LINQ takes advantage of existing
> methods on Lists when it can.
>

Likewise. Because arrays are used absolutely everywhere in ruby, making a
common method like count slower will have a whole lot of hidden performance
penalties... Anything we can do to make these core classes faster is a win
for everyone
_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to