Idea for a possibly better Collection occurrencesOf method.

J J azreal1977 at hotmail.com
Tue Sep 12 06:41:03 UTC 2006


I think it would be worth it to change this occurance, and any others to use 
the library instead
of hand made counts like this.  That way if someone does make some kind of 
optimization then
this function will get that too.


>From: tim Rowledge <tim at rowledge.org>
>Reply-To: The general-purpose Squeak developers 
>list<squeak-dev at lists.squeakfoundation.org>
>To: The general-purpose Squeak developers 
>list<squeak-dev at lists.squeakfoundation.org>
>Subject: Re: Idea for a possibly better Collection occurrencesOf method.
>Date: Mon, 11 Sep 2006 17:41:15 -0700
>
>You might possibly be able to measure a small performance cost to  using 
>inject:into: because it passes down to a virtually identical  loop (ie uses 
>a temp, a do: loop etc) and costs you one extra message  send or so.  If 
>someone chose to write the compiler optimiser code to  inline inject:into: 
>then it would not cost even that.
>
>Given that modern machines are typically able to send 3-10 million  
>messages a second, it probably isn't worth anyone's effort.
>
>tim
>--
>tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
>Oxymorons: Airline Food
>
>
>





More information about the Squeak-dev mailing list