[squeak-dev] Re: [ANN] A new scheduler + VM changes alpha-release

Andreas Raab andreas.raab at gmx.de
Thu Apr 30 16:27:45 UTC 2009


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.

Cheers,
   - Andreas



More information about the Squeak-dev mailing list