2GB changes file and a pony (was: [squeak-dev] ALL CLEAR (Re: CompiledMethodTrailers ready for use))

Levente Uzonyi leves at elte.hu
Thu Dec 24 01:30:38 UTC 2009


On Wed, 23 Dec 2009, David T. Lewis wrote:

> On Wed, Dec 23, 2009 at 11:07:54PM +0100, Levente Uzonyi wrote:
>> On Wed, 23 Dec 2009, David T. Lewis wrote:
>>>
>>> That said, performance is poor so this is not ready for prime time.
>>> I'm attaching an update that is somewhat less bad, but still nowhere
>>> near good enough (3 or 4 times slower than StandardSourceFileArray).
>>>
>>
>> Which part is 3-4 times slower? Can you show us your benchmark?
>>
>
> I'm glad you asked. There was a typo in my test, and performance
> seems to be pretty good after all. Here is what I was checking:
>
>  Time millisecondsToRun: [
> 	sf := StandardSourceFileArray new.
> 	(16r1000000 to: 16r1FFFFFF by: 11) do: [:e |
> 		i := sf fileIndexFromSourcePointer: e.
> 		p := sf filePositionFromSourcePointer: e.
> 		a := sf sourcePointerFromFileIndex: i andPosition: p.
> 		a = e ifFalse: [self error: 'snafu']]
> 	] ==> 3391
>
>  Time millisecondsToRun: [
> 	sf := ExpandedSourceFileArray new.
> 	(16r1000000 to: 16r1FFFFFF by: 11) do: [:e |
> 		i := sf fileIndexFromSourcePointer: e.
> 		p := sf filePositionFromSourcePointer: e.
> 		a := sf sourcePointerFromFileIndex: i andPosition: p.
> 		a = e ifFalse: [self error: 'snafu']]
> 	] ==> 3220
>

My slightly modified (but semantically the same) version:

{ StandardSourceFileArray. ExpandedSourceFileArray } collect: [ :class |
 	[
 		| sf |
 		sf := class new.
 		16r1000000 to: 16r1FFFFFF by: 11 do: [:e |
 			| i p a |
 			i := sf fileIndexFromSourcePointer: e.
 			p := sf filePositionFromSourcePointer: e.
 			a := sf sourcePointerFromFileIndex: i andPosition: p.
 			a = e ifFalse: [self error: 'snafu' ] ] ] timeToRun ]

gives #(766 682) on my pc.

So I think the performance is "solved". :)


Levente

>
> Dave
>
>
>



More information about the Squeak-dev mailing list