On Mon, Aug 15, 2016 at 9:11 AM, Clément Bera
wrote:
>
>
> On Mon, Aug 15, 2016 at 12:54 AM, John Brant
> wrote:
>
>>
>> > On Aug 14, 2016, at 4:42 PM, Henrik Nergaard
>> wrote:
>> >
>> > Hi,
>> >
>> > Why is “[ * ] repeat” almost twice as slow as “[ * . true ] whileTrue”
>> ?
>>
>> #repeat is
On Mon, Aug 15, 2016 at 12:54 AM, John Brant
wrote:
>
> > On Aug 14, 2016, at 4:42 PM, Henrik Nergaard
> wrote:
> >
> > Hi,
> >
> > Why is “[ * ] repeat” almost twice as slow as “[ * . true ] whileTrue” ?
>
> #repeat isn’t optimized by the compiler like #whileTrue is. I don’t know
> if there is
> On Aug 14, 2016, at 4:42 PM, Henrik Nergaard wrote:
>
> Hi,
>
> Why is “[ * ] repeat” almost twice as slow as “[ * . true ] whileTrue” ?
#repeat isn’t optimized by the compiler like #whileTrue is. I don’t know if
there is a reason for this, but most every other Smalltalk (Squeak, VW, &
D
Hi,
Why is "[ * ] repeat" almost twice as slow as "[ * . true ] whileTrue" ?
--
[
| n |
n := 0.
[
[
n := n + 1.
n > 1 ifTrue: [ Error signal ]
] repeat
] on: Error do: [ :err | ].
] timeToRu