A naive question about the speed optimization of anthony

Stephane Ducasse ducasse at iam.unibe.ch
Thu Apr 3 14:12:15 UTC 2003


Hi

from my experience loading Squeak in VisualWorks there are some places 
ofr the imgaeSegment (if I remember well) where you have code like that:


[:each |
		..
	..	
		..
		each := nil]

which you cannot do with real block-closures. So I guess that all the 
places where
block arguments are assigned will have to be checked.

In my experiment there were around 10 for the complete image.

Stef




On Thursday, April 3, 2003, at 12:43 AM, Andreas Raab wrote:

> John,
>
> Actually I think this should be no problem. If I'm not mistaken then 
> the
> only problem you may have is if you use block-local temps which are
> syntactically allowed in Squeak but not nil-ed out between evaluations 
> of
> that block. E.g., you could theoretically write something like:
>
> 	1 to: 3 do:[:i|
> 		| value |
> 		value ifNil:[value := 0].
> 		value := value + 1.
> 		result := value
> 	].
>
> Which would result in 3 with the current and 1 with the BC behavior. 
> Besides
> that I *think* that there is no semantical change involved. And the 
> above
> could be found automatically as it only involves temps which are read 
> before
> written.
>
> Can you think about any other situations which would have any change in
> semantics?!
>
> Cheers,
>   - Andreas
>
>> -----Original Message-----
>> From: squeak-dev-bounces at lists.squeakfoundation.org
>> [mailto:squeak-dev-bounces at lists.squeakfoundation.org] On
>> Behalf Of John M McIntosh
>> Sent: Thursday, April 03, 2003 12:03 AM
>> To: The general-purpose Squeak developers list
>> Subject: Re: A naive question about the speed optimization of anthony
>>
>>
>> Hi, actually I'll throw a question back. In some respects a
>> concern I
>> have is how that changes how an application runs. Right now
>> because you
>> lack full blocks with proper closure one can code up some smalltalk
>> that works just fine for your application right now. But after
>> introducing the VM change, why it will behave differently.
>> This is the
>> risk that we face in making the VM change, beyond performance.
>>
>> So now I'm wondering if as an re-engineering challenge you
>> folks have a
>> tool that could statically evaluate blocks and decide if a
>> particular
>> block has risky behavior, thus it would need to be reviewed/retested
>> when used with VM that does proper closure.
>>
>> On Tuesday, April 1, 2003, at 12:06  PM, Stephane Ducasse wrote:
>>
>>> Hi
>> (2) what are the problems to introduce them in Squeak (for
>> example with
>> the optimizations is seaside continuation passing style still
>> working),
>>>
>>> So tell me
>>>
>>> Stef
>>> --
>> ==============================================================
>> ==========
>> ===
>> John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
>> Corporate Smalltalk Consulting Ltd.
>> http://www.smalltalkconsulting.com
>>
>> ==============================================================
>> ==========
>> ===
>>
>>
>
>
>
>
Prof. Dr. Stéphane DUCASSE
http://www.iam.unibe.ch/~ducasse/
  "if you knew today was your last day on earth, what would you do 
different? ...  especially if,
  by doing something different, today might not be your last day on 
earth" Calvin&Hobbes

"The best way to predict the future is to invent it..." Alan Kay.

Open Source Smalltalks: http://www.squeak.org, 
http://www.gnu.org/software/smalltalk/smalltalk.html
Free books for Universities at 
http://www.esug.org/sponsoring/promotionProgram.html
Free Online Book at 
http://www.iam.unibe.ch/~ducasse/WebPages/FreeBooks.html


Prof. Dr. Stéphane DUCASSE
http://www.iam.unibe.ch/~ducasse/
  "if you knew today was your last day on earth, what would you do 
different? ...  especially if,
  by doing something different, today might not be your last day on 
earth" Calvin&Hobbes

"The best way to predict the future is to invent it..." Alan Kay.

Open Source Smalltalks: http://www.squeak.org, 
http://www.gnu.org/software/smalltalk/smalltalk.html
Free books for Universities at 
http://www.esug.org/sponsoring/promotionProgram.html
Free Online Book at 
http://www.iam.unibe.ch/~ducasse/WebPages/FreeBooks.html

Prof. Dr. Stéphane DUCASSE
http://www.iam.unibe.ch/~ducasse/
  "if you knew today was your last day on earth, what would you do 
different? ...  especially if,
  by doing something different, today might not be your last day on 
earth" Calvin&Hobbes

"The best way to predict the future is to invent it..." Alan Kay.

Open Source Smalltalks: http://www.squeak.org, 
http://www.gnu.org/software/smalltalk/smalltalk.html
Free books for Universities at 
http://www.esug.org/sponsoring/promotionProgram.html
Free Online Book at 
http://www.iam.unibe.ch/~ducasse/WebPages/FreeBooks.html


More information about the Squeak-dev mailing list