Sebastian Sastre a écrit :
> I wonder about the real difference of that. Do you have metrics of
> both implementations to compare convenience?
I don't need to. Relying on Hash#_each will create pair objects and
invoke an iterator on each turn, which in turn will rely on
Enumerable#each thereby working within a try/catch block. Both these
aspects guarantee a significantly lower performance to raw looping.
> Anyway.. my point is that I'm wondering why Hash don't answers to
> size itself with the best (possible at the moment) implementation to
> query and answer it's actual size?
This was deemed unnecessary. Personally, I hardly see why I'd want the
size of a Hash, I certainly never needed that. So the default
implementation, which is certainly perfectible on a case-by-case basis,
is used.
> If your algorithm introduces, let's say 2% o more better
> performance, so what Prototype team is waiting to adopt it 1)
"YAGNI", my friend. Prototype doesn't need to clutter itself with
addressing minority needs from the world over. We don't try to be
everything to everybody, but to address a reasonable feature set.
--
Christophe Porteneuve aka TDD
[EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---