On Mon, Aug 15, 2016 at 9:11 AM, Clément Bera <[email protected]> wrote:
> > > On Mon, Aug 15, 2016 at 12:54 AM, John Brant <[email protected]> > wrote: > >> >> > On Aug 14, 2016, at 4:42 PM, Henrik Nergaard <[email protected]> >> 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... > And arguably when we have Sista/Scorch we can reduce the number of optimized selectors, but only if we don't care about pure interpreter performance. > John Brant >> > _,,,^..^,,,_ best, Eliot
