So soon in our nice smalltalk :) Begin forwarded message:
From: Ralph Boland <rpboland@gmail.com> Date: July 22, 2009 8:31:36 PM CEDT To: stephane.ducasse@inria.fr Cc: henrik.s.johansen@veloxit.no Subject: New version of FastSets released
I have released a new verion of FastSets.
I changed noCompareAdd: to noCompareOrGrowAddAll:. Basically this is the modification proposed by Henry J. Not only is it faster but it is simpler too. I did not modify the addAll: method though. I don't believe this change should be part of FastSets and state no opinion as whether it is a good idea.
The previous version did not apply FastSets to MethodDictionary. This is now fixed.
The previous did not apply FastSets to most of the rehash methods. This is now fixed.
I also added the public method nastyAddNew:.
I also wrote an intersection: method for Sets which uses nastyAddNew: and, partly because of this, is faster than the method inherited from Collection.
I added some additional SUnit tests but did not attempt to add the many missing SUnit tests for subclasses of Set.
Of course I can no longer state that I have used this code since Squeak 3.6 so testing is much more of an issue. I filed my project (100,000 lines of code) into a clean image and ran it without problems and ran the SUnit tests. That's about it for my testing.
I will delay announcing the release for a day or two. If you want to check it out and propose further changes then I can make them or give permission for Henry or someone else to make them.
By the way, to see the perfomance improvement in terms of the number of compares try: "ComparesCountingSet example". There is a comment in class FastSetsComment useful for anyone wanting to use FastSets or integrate it into a base image.
Back to my own project (which uses FastSets of course).
Ralph Boland