March 18, 2010
2:40 a.m.
On 18.03.2010 02:08, Chris Muller wrote: > Thank you very much for the links. Ok, so if you take Lukas' test > code from the first link, and try it in trunk. Here it is, but > tweaked for an IdentitySet and increased to simulate a modestly-sized > real-world use-case, 250K elements: > > | test ord | > test := IdentitySet new. > [ test size>= 250000 ] whileFalse: [ > ord := OrderedCollection new: 100. > 1000 timesRepeat: [ > test add: ( ord add: Object new ) ]. > Transcript > show: test size asString; > tab. > Transcript show: > [ > 10 timesRepeat: [ > ord do: [ :each | test includes: each ] ] > ] timeToRun asString. > Transcript cr ] > > 3.9 can run this entire thing and be done with it in under one minute. > In trunk, all looks pretty fine until 136K elements, at which point > it completely seizes up; worse by a factor of> 120X. > > - Chris Simplistic fix: - remove 282311 from HashedCollection class>>goodPrimes. The table should probably be remade for squeak, keeping in mind the scaledIdentityHash implementation. Cheers, Henry