Hi all, I was looking into some of the array methods and noticed this inconsistency. >>> [1].without("1"); [] >>> [1].intersect(["1"]); []
Basically, without uses an == comparison, whereas intersect uses an === comparison. IMHO, I think == is more appropriate. As such, I have forked the prototype repo and modified intersect. You can view the diff here: http://github.com/blatyo/prototype/commit/8b9a7b721ef787110f85c03a28c3cdb3c67dbe34 I also created a test to see how the two methods performed against each other. See that here: http://groups-beta.google.com/group/prototype-core/web/uniontest.tar.gz Here are some of the results I got in milliseconds (running on chromium): Testing New Intersect 4517 4614 4823 4998 4856 Testing Old Intersect 7321 7337 7376 7353 7331 Let me know what you guys think. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to prototype-core-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~----------~----~----~----~------~----~------~--~---