On Mon, Aug 15, 2016 at 12:54 AM, John Brant <brant@refactoryworkers.com> wrote:

> On Aug 14, 2016, at 4:42 PM, Henrik Nergaard <henrik.nergaard@uia.no> 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, & Dolphin) optimize the #repeat method.


On Squeak it's optimized by default too.
��
I had an intern adding that as a bytecode compiler option and make the decompiler compliant with this. One needs to check if everything still works fine but it can be enabled. Something like: <compilerOptions: + inlineRepeat> should already work.

I think the idea was to keep limited the number of inlined messages, hence that one is not inlined by default. #timesRepeat: is not inlined either in Pharo. But then where's the limit between what you inline and what you don't...��
��
John Brant