[squeak-dev] Burn the Squeak Image! (Why I am running for board)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
74 messages Options
1234
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Burn the Squeak Image! (Why I am running for board)

Eliot Miranda-2


On Sat, Feb 28, 2009 at 6:55 PM, Ramon Leon <[hidden email]> wrote:
I was trying to guide the discussion back to Matthews proposal which I agree with. I'm not suggesting they should adopt any image.

You misunderstand, I was agreeing with you, the comment about what was absurd wasn't in reply to you but to the previous suggestion that all these different forks could be convinced to come back to a core image; just isn't going to happen.
 
I think getting the various communities to buy in and commit to a vision of shared core packages should be the responsibility of the board. It should be in each communities interest to work on such an activity. This is where the real work will need to be done.

Again, I was agreeing with that position.

Andreas is the only person I've seen proposing anything at all pragmatic for the board to do.  SNIP

What isn't pragmatic about Matthew's proposal? I don't think he suggests  that the board does this themselves - maybe I misunderstood.

I like his proposal, that doesn't make it pragmatic, at least, not as pragmatic as what Andreas is always saying, harvest what's done, rather than making big plans for doing stuff that the past has shown rarely works out.

One of Squeaks big problems, IMHO, is that every version is planned and realised by someone grand idea of features that should be in the next version.  More often than not, this is vaporware, work someone wants to do, or thinks can be done, but isn't done, so everyone waits and waits and waits for a new version.

I'd much rather see releases done by specific dates, like a release every 6 months, each release harvesting the latest fixes and patches of accomplished work.  Make it easier to get new stuff integrated into the core by releasing regularly and often rather than these pie in the sky visions of what might be.  Guaranteed steady gradual evolution and continual progress beats the hell out of revolutionary grand changes that might or might not actually happen.
 
I don't think the board should be following and picking. I don't think that works. The sub communities should be playing an active role in this and I think it should be the boards responsibility to:

 - Convince each community that it's worth doing
 - Find out and agree what needs to be done
 - Enable each community to work
     - Remove barriers
     - Define processes
     - Resources: tools, email lists, servers, etc
 - Manage the overall progress and lend support where necessary

- Zulq

Which is what they've been doing, it's not been working so well.  The Squeak community wouldn't be splintered into so many fragments otherwise.  The Pharo guys forked because it's the only way to get anything done, it takes too long to try and get anything real done in the core Squeak, progress is glacial, so everyone forks.

Keith and Matthew are right, focus on packages and tools for sharing code, Andreas is right, focus on what's done, integrate it, make progress, stop the pie in the sky dreams of the ultimate system, or core kernel image, or whatever other pipe dream people keep chasing that clearly isn't being used by all the sub communities anyway. 

I need to point out that unless the various communities can start building their disparate and diverging images form a micro-kernel image I don't see how improved execution technology is going to be adopted by the community.  I'm working hard on a VM that will be potentially 10x the current Squeak VM for Smalltalk intensive benchmarks.  This VM will be source code compatible and bytecode compatible but likely it will not be image compatible as it will use a streamlined object representation that doesn't use compact classes.  The only way I can see this being adopted by the community at large is if the community starts building images form microkernels.

I'm sure you can see there are significant benefits in building images form automatically constructed microkernels.
- images are no longer tied to obsolete image formats and/or object memory layouts and restrictions (such as a single contiguous heap segment with no support for memory-mapped segments, giving memory back to the OS after GC, pinning objects for the FFI, etc, etc).
- bytecode sets, compilation technology and VM technology can evolve and improve performance as ingenuity permits
- platform integration can improve, e.g. allowing Squeak as a DLL

If the various forks maintain different basic images instead of different bootstraps (same end-point, different starting-points) then this just isn't practicable and performance won't improve.

So I hope you're wrong and that starting from kernel images isn't a pipe dream.  Let me emphasisze I am *not* advocating a common development image, only a common microkernel from which all other images can be built, automatically.
 

I don't care what image I use, I care what packages I use.  I care that my Collections package is the latest and greatest, or that my Seaside package is up to date, or that I'm using the newest FFI, or the right Polymorph.  I don't care about eToys or Graphics or 3D or anything to do with educating kids.  Packages are more important than images.  The only thing I want from an image is that it isn't bloated with a bunch of unloadable code like eToys that infects everything and breaks everything when you try and remove it.

Elliot is right about building images from scripts as well, I want to automate the builds of the images I use with a script to load onto a base image just the packages I want.  Damien does this now with his dev images, a good starting point for me, then I use a script and Keiths installer to further load and customize it to my liking.

Anyway, now I'm just rambling, so I'll leave it at that.  +1 for tools, Packages, and integrate what's done and get it out.






Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Burn the Squeak Image! (Why I am running for board)

Avi Bryant-2
On Sat, Feb 28, 2009 at 7:32 PM, Eliot Miranda <[hidden email]> wrote:

> I need to point out that unless the various communities can start building
> their disparate and diverging images form a micro-kernel image I don't see
> how improved execution technology is going to be adopted by the community.
>  I'm working hard on a VM that will be potentially 10x the current Squeak VM
> for Smalltalk intensive benchmarks.  This VM will be source code compatible
> and bytecode compatible but likely it will not be image compatible as it
> will use a streamlined object representation that doesn't use compact
> classes.  The only way I can see this being adopted by the community at
> large is if the community starts building images form microkernels.

I'm not sure that's true.  Say it becomes yet another fork, separate
(necessarily, at first, because it's a different image format) from
all of the other forks.  As long as most packages can be loaded into
it, it'll get used.  Maybe not by the people doing the forking (by
Scratch, say, or Squeakland), but by the majority of us who have a few
pet packages (in my case, Seaside, OmniBrowser, DabbleDB, etc) that we
can load into nearly any Squeak image and feel at home.  I'm pretty
happy to load those into a MinimalMorphic image this month, a Pharo
image next month, and a Cog image the month after, if there's some
compelling reason to do so - and 10x performance would certainly be
compelling.

A shared microkernel would be nice, but I don't think it's essential
in the short term to drive adoption of a new technology.

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Burn the Squeak Image! (Why I am running for board)

Ramon Leon-5
I'm not sure that's true.  Say it becomes yet another fork, separate
(necessarily, at first, because it's a different image format) from
all of the other forks.  As long as most packages can be loaded into
it, it'll get used.  Maybe not by the people doing the forking (by
Scratch, say, or Squeakland), but by the majority of us who have a few
pet packages (in my case, Seaside, OmniBrowser, DabbleDB, etc) that we
can load into nearly any Squeak image and feel at home.  I'm pretty
happy to load those into a MinimalMorphic image this month, a Pharo
image next month, and a Cog image the month after, if there's some
compelling reason to do so - and 10x performance would certainly be
compelling.

A shared microkernel would be nice, but I don't think it's essential
in the short term to drive adoption of a new technology.


Ditto, as I said earlier, I care about my packages, not which squeak image is the base, but for a 10x bump in speed, I'd certainly take the time to port everything I use, if only for deployment.  Getting everyone on a common kernel would take something really compelling them all to feel the same way, a 10x bump in speed *is certainly* compelling.

Ramon Leon
http://onsmalltalk.com


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Burn the Squeak Image! (Why I am running for board)

stephane ducasse
In reply to this post by Klaus D. Witzel
>
>
> - http://www.google.com/search?q=John+Maloney+MicroSqueak

Were is the code of microSqueak



Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Burn the Squeak Image! (Why I am running for board)

Bert Freudenberg

On 01.03.2009, at 09:59, stephane ducasse wrote:
> Were is the code of microSqueak

On John's hard disk. He did it a couple of years ago and showed it to  
us last summer. As Eliot wrote, it builds an image in memory from a  
hierarchy of classes. Pretty neat, though probably more a proof of  
concept than production-ready.

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Burn the Squeak Image! (Why I am running for board)

Igor Stasenko
In reply to this post by Avi Bryant-2
2009/3/1 Avi Bryant <[hidden email]>:

> On Sat, Feb 28, 2009 at 7:32 PM, Eliot Miranda <[hidden email]> wrote:
>
>> I need to point out that unless the various communities can start building
>> their disparate and diverging images form a micro-kernel image I don't see
>> how improved execution technology is going to be adopted by the community.
>>  I'm working hard on a VM that will be potentially 10x the current Squeak VM
>> for Smalltalk intensive benchmarks.  This VM will be source code compatible
>> and bytecode compatible but likely it will not be image compatible as it
>> will use a streamlined object representation that doesn't use compact
>> classes.  The only way I can see this being adopted by the community at
>> large is if the community starts building images form microkernels.
>
> I'm not sure that's true.  Say it becomes yet another fork, separate
> (necessarily, at first, because it's a different image format) from
> all of the other forks.  As long as most packages can be loaded into
> it, it'll get used.  Maybe not by the people doing the forking (by
> Scratch, say, or Squeakland), but by the majority of us who have a few
> pet packages (in my case, Seaside, OmniBrowser, DabbleDB, etc) that we
> can load into nearly any Squeak image and feel at home.  I'm pretty
> happy to load those into a MinimalMorphic image this month, a Pharo
> image next month, and a Cog image the month after, if there's some
> compelling reason to do so - and 10x performance would certainly be
> compelling.
>
> A shared microkernel would be nice, but I don't think it's essential
> in the short term to drive adoption of a new technology.
>

It is essential in a terms of allowing evolution of VM as a regular
process, not as a single major blow which done once, then adopted and
frozen for the next 10 years (or more).
VM having a certain contracts with a language side, like object
formats, bytecode set, special objects and their slot positions, core
classes etc etc..
If you not follow the VM obligations on this - you can't declare your
image/work as a safe, stable environment.
And kernel image is the best way to ensure that all such contracts is
fullfilled. It serves to identify all such contracts, represent them
at language side and make them work.
Without kernel image, we doomed to wander in the dark, guessing , what
code needs to be changed to adopt new VM capabilities, and also keep
VM developers care much more about backward compatibility (often by
sacrificing the cool improvements, just because of fear that it will
not be compatible).


--
Best regards,
Igor Stasenko AKA sig.

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Burn the Squeak Image! (Why I am running for board)

Stéphane Rollandin
In reply to this post by Eliot Miranda-2
Eliot Miranda a écrit :
> I need to point out that unless the various communities can start building
> their disparate and diverging images form a micro-kernel image I don't see
> how improved execution technology is going to be adopted by the community.
>  I'm working hard on a VM that will be potentially 10x the current Squeak VM
> for Smalltalk intensive benchmarks.  This VM will be source code compatible
> and bytecode compatible but likely it will not be image compatible as it
> will use a streamlined object representation that doesn't use compact
> classes.  The only way I can see this being adopted by the community at
> large is if the community starts building images form microkernels.

maybe a silly question (I have no idea of what is involved): would
converting an image from the current format to the one your VM will
require be an option ?

Stef


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Burn the Squeak Image! (Why I am running for board)

Igor Stasenko
2009/3/1 Stéphane Rollandin <[hidden email]>:

> Eliot Miranda a écrit :
>>
>> I need to point out that unless the various communities can start building
>> their disparate and diverging images form a micro-kernel image I don't see
>> how improved execution technology is going to be adopted by the community.
>>  I'm working hard on a VM that will be potentially 10x the current Squeak
>> VM
>> for Smalltalk intensive benchmarks.  This VM will be source code
>> compatible
>> and bytecode compatible but likely it will not be image compatible as it
>> will use a streamlined object representation that doesn't use compact
>> classes.  The only way I can see this being adopted by the community at
>> large is if the community starts building images form microkernels.
>
> maybe a silly question (I have no idea of what is involved): would
> converting an image from the current format to the one your VM will require
> be an option ?
>
converting an object format does not makes objects behave differently , right?
Ask yourself, why you doing a lot of cleanup, throwing away obsolete
stuff and replacing with better one in Pharo, and why we coudn't do
much the same with VM? :)

> Stef
>
>
>



--
Best regards,
Igor Stasenko AKA sig.

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Burn the Squeak Image! (Why I am running for board)

Stéphane Rollandin

>> maybe a silly question (I have no idea of what is involved): would
>> converting an image from the current format to the one your VM will require
>> be an option ?
>>
> converting an object format does not makes objects behave differently , right?
> Ask yourself, why you doing a lot of cleanup, throwing away obsolete
> stuff and replacing with better one in Pharo, and why we coudn't do
> much the same with VM? :)
>
>> Stef


hum.. I guess I don't know what I am talking about. BTW, I am not the
Stef working in Pharo, I'm another Stef :)


regards,

Stef


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Burn the Squeak Image! (Why I am running for board)

Igor Stasenko
2009/3/1 Stéphane Rollandin <[hidden email]>:

>
>>> maybe a silly question (I have no idea of what is involved): would
>>> converting an image from the current format to the one your VM will
>>> require
>>> be an option ?
>>>
>> converting an object format does not makes objects behave differently ,
>> right?
>> Ask yourself, why you doing a lot of cleanup, throwing away obsolete
>> stuff and replacing with better one in Pharo, and why we coudn't do
>> much the same with VM? :)
>>
>>> Stef
>
>
> hum.. I guess I don't know what I am talking about. BTW, I am not the Stef
> working in Pharo, I'm another Stef :)

ah.. sorry :)
Changing the object formats alone does not gives any benefits. What is
the point in having new format when you keep using old semantic model
as before?
This is like swapping instance variables order in your class.. Apart
from a better aestetical view it gives you nothing :)

>
>
> regards,
>
> Stef
>


--
Best regards,
Igor Stasenko AKA sig.

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Burn the Squeak Image! (Why I am running for board)

Stéphane Rollandin

> ah.. sorry :)
> Changing the object formats alone does not gives any benefits. What is
> the point in having new format when you keep using old semantic model
> as before?
> This is like swapping instance variables order in your class.. Apart
> from a better aestetical view it gives you nothing :)

let me reformulate. what I asked really is: will there be some way to
have existing images run on the coming Cog VM ? (quoting Eliot Miranda:
"this VM will be source code compatible and bytecode compatible but
likely it will not be image compatible as it will use a streamlined
object representation that doesn't use compact classes")

Stef


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Burn the Squeak Image! (Why I am running for board)

Bert Freudenberg
In reply to this post by Avi Bryant-2
On 01.03.2009, at 05:02, Avi Bryant wrote:

> On Sat, Feb 28, 2009 at 7:32 PM, Eliot Miranda <[hidden email]
> > wrote:
>
>> I need to point out that unless the various communities can start  
>> building
>> their disparate and diverging images form a micro-kernel image I  
>> don't see
>> how improved execution technology is going to be adopted by the  
>> community.
>>  I'm working hard on a VM that will be potentially 10x the current  
>> Squeak VM
>> for Smalltalk intensive benchmarks.  This VM will be source code  
>> compatible
>> and bytecode compatible but likely it will not be image compatible  
>> as it
>> will use a streamlined object representation that doesn't use compact
>> classes.  The only way I can see this being adopted by the  
>> community at
>> large is if the community starts building images form microkernels.
>
> I'm not sure that's true.  Say it becomes yet another fork, separate
> (necessarily, at first, because it's a different image format) from
> all of the other forks.  As long as most packages can be loaded into
> it, it'll get used.  Maybe not by the people doing the forking (by
> Scratch, say, or Squeakland), but by the majority of us who have a few
> pet packages (in my case, Seaside, OmniBrowser, DabbleDB, etc) that we
> can load into nearly any Squeak image and feel at home.  I'm pretty
> happy to load those into a MinimalMorphic image this month, a Pharo
> image next month, and a Cog image the month after, if there's some
> compelling reason to do so - and 10x performance would certainly be
> compelling.
>
> A shared microkernel would be nice, but I don't think it's essential
> in the short term to drive adoption of a new technology.

Agreed.

I'm still looking for ways to get Squeakland Etoys and squeak.org  
sharing resources as much as possible. We last cross-merged for the  
3.8 release, which was a considerable manual effort, but worth it for  
both sides (etoys got many bug fixes, squeak.org got the m17n/unicode  
support). After that, some new packages were shared (Rome, DBus,  
GStreamer), but no reliable process for exchanging bug fixes exists -  
not because we do not want it, but because it's simply too much effort.

I'll support anyone who finds a way around this, a way to share  
between forks. Matthew's proposal sounds great and doable. I'll  
advocate starting to use Monticello for Etoys development - it's the  
only feasible way to share I see currently.

Sharing a microkernel image would be nice but I fear too much has  
changed in the class/metaclass kernel to make that feasible.  But  
perhaps for using Cog, does it really require extensive image-level  
changes, or couldn't the SystemTracer be used to convert the image  
format?

- Bert -


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Burn the Squeak Image! (Why I am running for board)

Raymond Asselin-3
In reply to this post by Ramon Leon-5
Le 28/02/09, Ramon Leon <[hidden email]> écrivait :

Agree with all Ramon, Andréas, and Mathew said till now

Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Re: Burn the Squeak Image! (Why I am running for board)

Andreas.Raab
In reply to this post by Igor Stasenko
Igor Stasenko wrote:
> Changing the object formats alone does not gives any benefits. What is
> the point in having new format when you keep using old semantic model
> as before?

Speed. That is the only point of the exercise to begin with.

> This is like swapping instance variables order in your class.. Apart
> from a better aestetical view it gives you nothing :)

If swapping ivars in a class would give me a 3x in performance I'd be
doing this all day long...

Cheers,
   - Andreas

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Burn the Squeak Image! (Why I am running for board)

Jecel Assumpcao Jr
In reply to this post by Bert Freudenberg
Bert Freudenberg wrote:

> Sharing a microkernel image would be nice but I fear too much has  
> changed in the class/metaclass kernel to make that feasible.  But  
> perhaps for using Cog, does it really require extensive image-level  
> changes, or couldn't the SystemTracer be used to convert the image  
> format?

Actually, I would say that the SystemTracer is interesting exactly when
you have extensive image changes that you want to do only once (say for
generating the Squeak 5.0 image starting from the 4.3 one). Some smaller
changes can be handled by doing the conversion while reading and saving
the image. A good example of that in Cog would be the stack pages - you
could create them when reading an old image and you can convert all
contexts to old style ones (so the stack pages would be empty) before
saving the image. A more radical change, like entirely different
bytecode encoding, is easier to do just once with the SystemTracer.

This has been an interesting thread about what is possible technically
as well as socially ("we could do that, but then the forks wouldn't
adopt it"). My "Chunky Squeak" proposal
(http://wiki.squeak.org/squeak/584) was meant to be an example of the
smallest possible change that I felt would be acceptable for everybody.
If people are feeling adventurous and would rather a really modular
microkernel Squeak, I have worked on that as well as described in my
"Neo Smalltalk modules" page (http://wiki.squeak.org/squeak/5637).

Any change to the image format is an extremely significant event in the
history of Squeak, probably even worse than the 680x0->PowerPC, Mac OS
9->Mac OS X and PowerPC->Intel changes that the Macintosh community had
to endure. I don't think it would be a good idea to do it in a series of
steps (except in private development images, of course) but instead it
would be better to gather all possible changes into a single 4.x->5.0
transition.

There are many little things I wouldn't mind seeing changed. I bet Bryce
Kampjes would love to have a 0 tag represent SmallIntegers, for example.
For SiliconSqueak (hardware implementation of the VM that I am
developing) it would be convenient to have tagged floating point
numbers, for another example. And I can't say that I am too happy with
the very conservative path that 64 bit Squeak ended up taking.

If we agree that each sub-community will have its own images and will at
most share Monitcello level packages, then none of the above is a big
deal. Let each one do what they like best. But I prefer trying for a
shared micro-image with as radical solution as possible, though not so
radical that we leave behind the community.

-- Jecel


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Burn the Squeak Image! (Why I am running for board)

Eliot Miranda-2
In reply to this post by Stéphane Rollandin


On Sun, Mar 1, 2009 at 3:19 AM, Stéphane Rollandin <[hidden email]> wrote:
Eliot Miranda a écrit :

I need to point out that unless the various communities can start building
their disparate and diverging images form a micro-kernel image I don't see
how improved execution technology is going to be adopted by the community.
 I'm working hard on a VM that will be potentially 10x the current Squeak VM
for Smalltalk intensive benchmarks.  This VM will be source code compatible
and bytecode compatible but likely it will not be image compatible as it
will use a streamlined object representation that doesn't use compact
classes.  The only way I can see this being adopted by the community at
large is if the community starts building images form microkernels.

maybe a silly question (I have no idea of what is involved): would converting an image from the current format to the one your VM will require be an option ?

One can convert images from one format to another using the SystemTracer.  This is a program that from within an image traces all the objects it can find and writes out a new image.  But its tricky.  The system isn't usable while the thing is running and the system inevitably includes the SystemTracer which one must later strip out if one wants e.g. a minimal deployment image.  So the SystemTracer approach isn't great. (It also suffers from an issue explained below).

One can convert images from one format to another using a program that reads an image, transforms it, and writes it, (I'll call this ImageRewriter) but this is tricky.  The image may contain user code that has constraints the ImageRewriter isn't aware of.  VisualWorks uses the ImageWriter approach to convert 32-bit images to 64bit images.  It does succeed in rewriting the base development image but occasionally will fail to produce a working rewrite of some complicated image.

Even then the image that ImageRewriter produces still needs to contain special support and to be saved to be ready for production.  One thing the image does for itself on startup is check if the size of the identity hash field has changed (in 64-bit VW images there is a larger id hash than in 32-bit VW images).  If the image finds the id hash filed has changed it rehashes all hashed collections except MethodDictionary.  The ImageRewriter (and SystemTracer) knows enough to be able to rehash MethodDictionary and IdentityDictionary.  But because the default implementation of #hash in Object is to answer identityHash a change in id hash can potentially affect equal-hashed collections, not just id-hashed ones.  But to be able to rehash an equal-hashed collection one must be able to evaluate #hash and #= and these are arbitrarily complex and it gets tricky to get either ImageRewriter or SystemTracer to rehash.  Note that they have to compute what the hash would be in the new image, not what it evaluates to in the current image  Hence it is much easier to have the new image rehash its non-MethodDictionary collections on start-up.

Clarly this is slow enough that one does it once when starting up the output of ImageRewriter, then saves.  The saved image then starts up without needng to rehash because the id-hash size won't have changed.

So both SystemTracer and ImageRewriter approaches have significant difficulties when trying to produce images in which things lie the id hash has changed.  They also have difficulties if the instruction set, class implementation, block implementation etc etc of the target has changed because it may be difficult to set-up the necessary invariants.

With the micro-kernel approach the real image is produced by loading code into the microkernel.  So the image transformers (be they SystemTracer, ImageRewriter or MicroKernelGenerator) only have to function on the known quantity which is the microkernel image, not on an arbitrarily complex development or product image.  Great.  But if the microkernel image is simple enough then why not generate it directly from a source specification (as John Maloney's MicroSqueak does)?  Instead of stripping code form an existing image, as one must do with both SystemTracer and ImageRewriter one produces just what the microkernel needs to contain, and it i exactly reproducible.  In any image that tries to prodeuce a microkernel exactly the same microkernel will be produced whereas with the SystemTracer and ImageRewriter approaches what one gets depends on the image one starts with.

So I much prefer the microkernel approach (I didn't used to; enlightenment comes slowly if at all).  It is not absolutely necessary but turns out to have significant advantages.  The only downside (and I don't even think it is a downside) is needing to build up a development or production image by loading code into the microkernel (I actually think this is a feature :) ).

HTH

est
Eliot
 


Stef





Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Burn the Squeak Image! (Why I am running for board)

Igor Stasenko
In reply to this post by Andreas.Raab
2009/3/1 Andreas Raab <[hidden email]>:

> Igor Stasenko wrote:
>>
>> Changing the object formats alone does not gives any benefits. What is
>> the point in having new format when you keep using old semantic model
>> as before?
>
> Speed. That is the only point of the exercise to begin with.
>
>> This is like swapping instance variables order in your class.. Apart
>> from a better aestetical view it gives you nothing :)
>
> If swapping ivars in a class would give me a 3x in performance I'd be doing
> this all day long...
>
but we both know that this is too good to be true.  :)
unless you change the way how things working, you can't achieve
significant performance boost. And often this means rewriting
interfaces, which inevitably leads to changing a lot of code on
language side etc.

> Cheers,
>  - Andreas
>


--
Best regards,
Igor Stasenko AKA sig.

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Burn the Squeak Image! (Why I am running for board)

Eliot Miranda-2


On Sun, Mar 1, 2009 at 12:23 PM, Igor Stasenko <[hidden email]> wrote:
2009/3/1 Andreas Raab <[hidden email]>:
> Igor Stasenko wrote:
>>
>> Changing the object formats alone does not gives any benefits. What is
>> the point in having new format when you keep using old semantic model
>> as before?
>
> Speed. That is the only point of the exercise to begin with.
>
>> This is like swapping instance variables order in your class.. Apart
>> from a better aestetical view it gives you nothing :)
>
> If swapping ivars in a class would give me a 3x in performance I'd be doing
> this all day long...
>
but we both know that this is too good to be true.  :)
unless you change the way how things working, you can't achieve
significant performance boost. And often this means rewriting
interfaces, which inevitably leads to changing a lot of code on
language side etc.

Uh, no.  Here is the inline cache check in Cog, which is as complicated as it is because of compact classes:

00009588: movl %edx, %eax : 89 D0 
0000958a: andl $0x00000001, %eax : 83 E0 01 
0000958d: jnz .+0x00000011 (0x000095a0=singleRelease@40) : 75 11 
0000958f: movl %ds:(%edx), %eax : 8B 42 00 
00009592: shrl $0x0a, %eax : C1 E8 0A 
00009595: andl $0x0000007c, %eax : 83 E0 7C 
00009598: jnz .+0x00000006 (0x000095a0=singleRelease@40) : 75 06 
0000959a: movl %ds:0xfffffffc(%edx), %eax : 8B 42 FC 
0000959d: andl $0xfffffffc, %eax : 83 E0 FC 
000095a0: cmpl %ecx, %eax : 39 C8 
000095a2: jnz .+0xffffffda (0x0000957e=LSICMissCall) : 75 DA 

In VisualWorks the code looks like

    movl %ebx, %eax
    andl $3, %eax
    jnz LCompare
    movl (%ebx), %eax
LCompare:
    cmpl %eax, %edx
    jnz +0xffffff??=LSICMissCall

That's 9 or 11 instructions (compact vs non-compact) vs 6 instructions in the common case, but vitally, for non-compact classes 2 memory reads vs one.

So indeed object representation can make a major difference in run-time performance.  Consider how much quicker object allocation is in VW, which does not have to check if the receiving class is compact or not, compared to Squeak. Consider how much quicker string access is in VW, which has immediate characters, than Squeak with the character table and the inability to do == comparisons on Unicode characters. etc. etc.

> Cheers,
>  - Andreas
>
--
Best regards,
Igor Stasenko AKA sig.

Best
Eliot


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Burn the Squeak Image! (Why I am running for board)

Stéphane Rollandin
In reply to this post by Eliot Miranda-2
ok, most of this stuff flies high above my head, but thanks for the
explanation :)

Stef


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Burn the Squeak Image! (Why I am running for board)

Igor Stasenko
In reply to this post by Eliot Miranda-2
2009/3/1 Eliot Miranda <[hidden email]>:

>
>
> On Sun, Mar 1, 2009 at 12:23 PM, Igor Stasenko <[hidden email]> wrote:
>>
>> 2009/3/1 Andreas Raab <[hidden email]>:
>> > Igor Stasenko wrote:
>> >>
>> >> Changing the object formats alone does not gives any benefits. What is
>> >> the point in having new format when you keep using old semantic model
>> >> as before?
>> >
>> > Speed. That is the only point of the exercise to begin with.
>> >
>> >> This is like swapping instance variables order in your class.. Apart
>> >> from a better aestetical view it gives you nothing :)
>> >
>> > If swapping ivars in a class would give me a 3x in performance I'd be
>> > doing
>> > this all day long...
>> >
>> but we both know that this is too good to be true.  :)
>> unless you change the way how things working, you can't achieve
>> significant performance boost. And often this means rewriting
>> interfaces, which inevitably leads to changing a lot of code on
>> language side etc.
>
> Uh, no.  Here is the inline cache check in Cog, which is as complicated as
> it is because of compact classes:
> 00009588: movl %edx, %eax : 89 D0
> 0000958a: andl $0x00000001, %eax : 83 E0 01
> 0000958d: jnz .+0x00000011 (0x000095a0=singleRelease@40) : 75 11
> 0000958f: movl %ds:(%edx), %eax : 8B 42 00
> 00009592: shrl $0x0a, %eax : C1 E8 0A
> 00009595: andl $0x0000007c, %eax : 83 E0 7C
> 00009598: jnz .+0x00000006 (0x000095a0=singleRelease@40) : 75 06
> 0000959a: movl %ds:0xfffffffc(%edx), %eax : 8B 42 FC
> 0000959d: andl $0xfffffffc, %eax : 83 E0 FC
> 000095a0: cmpl %ecx, %eax : 39 C8
> 000095a2: jnz .+0xffffffda (0x0000957e=LSICMissCall) : 75 DA
> In VisualWorks the code looks like
>     movl %ebx, %eax
>     andl $3, %eax
>     jnz LCompare
>     movl (%ebx), %eax
> LCompare:
>     cmpl %eax, %edx
>     jnz +0xffffff??=LSICMissCall
> That's 9 or 11 instructions (compact vs non-compact) vs 6 instructions in
> the common case, but vitally, for non-compact classes 2 memory reads vs one.
> So indeed object representation can make a major difference in run-time
> performance.  Consider how much quicker object allocation is in VW, which
> does not have to check if the receiving class is compact or not, compared to
> Squeak. Consider how much quicker string access is in VW, which has
> immediate characters, than Squeak with the character table and the inability
> to do == comparisons on Unicode characters. etc. etc.

Sometimes I having troubles with expressing my thoughts clearly.. sorry.
I din't mean that changing object format does not improves the speed.
I meant that such changes alone is very hard to adopt without ANY
changes on language side.
See
Behavior>>becomeCompact
becomeCompactSimplyAt: index
becomeUncompact

see also
#compactClassesArray

and i suspect this list is only a top of the iceberg (for instance,
you may need to change SpaceTally to report things properly).

Now, defending you point, that really, it would be much easier to deal
with such things in a micro-image (consider the amount of code and
tests which you need to perform when producing new update).

This makes you, as a VM developer be responsible from good integration
of VM with language side.
Then rest images, which is based on it will have to use things
strictly in manner, as it put in kernel.
It is important to draw a line between kernel and rest of the code in
image, which depends on it.

>>
>> > Cheers,
>> >  - Andreas
>> >
>> --
>> Best regards,
>> Igor Stasenko AKA sig.
>
> Best
> Eliot
>
>
>



--
Best regards,
Igor Stasenko AKA sig.

1234