[squeak-dev] Re: [ANN] A new scheduler + VM changes alpha-release
Igor Stasenko
siguctua at gmail.com
Thu Apr 30 17:03:55 UTC 2009
Running this test with #fixTemps.
semas := Array new: 10000.
plist := Array new: 10000.
1 to: semas size do:[:i| semas at: i put: Semaphore new].
1 to: plist size-1 do:[:i| plist at: i put: [(semas at: i) wait.
(semas at:i+1) signal] fixTemps fork].
[semas first signal. semas last wait] timeToRun.
New:
63
63
148
65
61
Old:
94
27
92
22
22
23
23
if we not count a spikes which seems just an intrusion of delays, the
difference about 3 times.
Fantastic results (bytecode interpreted scheduling works 3 times
slower than C code) :)
After changing 2 lines of code (to use #interruptWith: , with no fallbacks)
50 125 50 49 48 48 60
so, now its about 2 times difference.
2009/4/30 Igor Stasenko <siguctua at gmail.com>:
> 2009/4/30 Andreas Raab <andreas.raab at gmx.de>:
>> Igor Stasenko wrote:
>>>
>>> A quick comparion for Delays:
>>>
>>> delay := Delay forMilliseconds: 1.
>>> bag := Bag new.
>>> 1000 timesRepeat:[bag add: [delay wait] timeToRun].
>>> bag sortedCounts
>>>
>>> on my 4-core box it yields:
>>>
>>> - with AdvancedProcessorScheduler install
>>> a SortedCollection(951->2 49->1)
>>>
>>> - with Processor fallbackToOldScheduler
>>> a SortedCollection(953->2 47->1)
>>>
>>> - with old VM
>>> a SortedCollection(952->2 47->1 1->3)
>>>
>>> not much overhead huh? :)
>>
>> That's not exactly the kind of benchmark I was looking for (if your process
>> scheduler takes milliseconds to do a switch I think we're not even close to
>> the ballpark ;-) More interesting for comparison is this (requires
>> closures):
>>
>> semas := Array new: 10000.
>> plist := Array new: 10000.
>> 1 to: semas size do:[:i| semas at: i put: Semaphore new].
>> 1 to: plist size-1 do:[:i| plist at: i put: [(semas at: i) wait. (semas
>> at:i+1) signal] fork].
>> [semas first signal. semas last wait] timeToRun.
>>
>
> I not yet tried to apply changes to VMMaker with closures.
> Do you have a recipe, which base image could load latest VMMaker w/o
> problems? Is 3.10.2 ok for it?
>
>> Cheers,
>> - Andreas
>>
>>
>
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
--
Best regards,
Igor Stasenko AKA sig.
More information about the Squeak-dev
mailing list
|