Hi

Indeed, iterating over a collection using symbols is somewhat ~20% slower :)

Here are some numbers:

aCol := (1 to: 100000000).


> [ 10 timesRepeat: [ aCol *do: #yourself* ] ] timeToRunWithoutGC / 10.0.
> *"1110.8"*
> [ 10 timesRepeat: [ aCol *do: [ :each | each yourself ]* ] ]
> timeToRunWithoutGC / 10.0. *"898.1"*.


> (1110.8 - 898.1) / 1110.8 * 100 "*19.14836154123154*"


Cheers,
Alex

On Tue, 21 Jan 2020 at 21:11, ducasse <[email protected]> wrote:

> Hi
>
> I’m fed up. Why?
> Because I see lousy code in Pharo and that such lousy code in Pharo is
> slower, and sure that writing a type inferencer
> for pharo will be more complex, and probably will make sista more complex
> too.
>
> I asked the pharo consortium to take a clear position because I want a
> better Pharo not the inverse.
> So what is it.
>
> You can write in your code but not in Pharo.
>
>         aCol do: #store
>
> in Pharo we should write
>
>         aCol do: [ :each | each store ]
>
> Block argument should be blocks else any static analyser will have to
> check it is a block, it is a symbol, is
> it a RANDOM object that answer value.
>
> Seriously can be not make the life of people doing program analysis
> simpler?
>
> So now if I’m wrong then I will shut up and I’m really pissed that we do
> that without paying attention
> to the consequence.
>
> I asked the consortium to take position and to take action.
> We should have a better code review for REAL.
>
> S.
>
>
>
>

Reply via email to