On Thu, 8 Jun 2000 17:41:59 -0400 (EDT) Bijan Parsia <[EMAIL PROTECTED]> wrote:
>Er.. ok, multiruns reveal:
>
>       #(157 125 36)#(88 105 30) #(231 111 71)
>
>Clearly, something like GC is interfering, which just goes to show how
>crappy my crappy benchmarks were ;)

The moral is: Never trust small numbers! I reran your tests with the origianl 
iteration count, 10x and 100x. (Each test was run 3 times). Note that in the two 
smaller iterations there was at least one case that was significantly different from 
one run to the next. On the Mac this can be background processing stolen from squeak. 
On other OS, it might be something else. Also, it's a good idea to see how long 
nothing takes just to know the baseline.

Iterations = 10000
91->'Dictionary/integer keys'
92->'IdentityDictionary/integer keys'
110->'OrderedCollection/integer keys'   <--***** whoa*** + 400%
8->'NOOP/integer keys'

Iterations = 10000
92->'Dictionary/integer keys'
93->'IdentityDictionary/integer keys'
22->'OrderedCollection/integer keys'
8->'NOOP/integer keys'

Iterations = 10000
94->'Dictionary/integer keys'
95->'IdentityDictionary/integer keys'
24->'OrderedCollection/integer keys'
9->'NOOP/integer keys'

====== with bugger numbers ====

Iterations = 100000
832->'Dictionary/integer keys'
1068->'IdentityDictionary/integer keys'
210->'OrderedCollection/integer keys'
84->'NOOP/integer keys'

Iterations = 100000
850->'Dictionary/integer keys'
961->'IdentityDictionary/integer keys'
310->'OrderedCollection/integer keys'   <----big change here + 50%
83->'NOOP/integer keys'

Iterations = 100000
922->'Dictionary/integer keys'
974->'IdentityDictionary/integer keys'
211->'OrderedCollection/integer keys'
83->'NOOP/integer keys'

======with bigger still numbers ======

Iterations = 1000000
9315->'Dictionary/integer keys'
9229->'IdentityDictionary/integer keys'
2222->'OrderedCollection/integer keys'
1036->'NOOP/integer keys'

Iterations = 1000000
9276->'Dictionary/integer keys'
9377->'IdentityDictionary/integer keys'
2347->'OrderedCollection/integer keys'
951->'NOOP/integer keys'

Iterations = 1000000
9257->'Dictionary/integer keys'
9481->'IdentityDictionary/integer keys'
2437->'OrderedCollection/integer keys'
949->'NOOP/integer keys'


>In a normal Dictionary, the instance variable 'array' holds an array of
>Associations.  Since there are thousands of methods in the system, these
>Associations waste space.  

But they do make life easier when updating shared variables.

Cheers,
Bob

Reply via email to