RE: How do tagged data structures work in Strongtalk?
"David Griswold" <[email protected]> Mon, 28 May 2007 14:54:18 +0200
| Newsgroups | gmane.comp.lang.smalltalk.strongtalk |
|---|---|
| Message-ID | <[email protected]> |
> -----Original Message----- > From: [email protected] > [mailto:[email protected]]On Behalf Of prunedtree > Sent: Monday, May 28, 2007 3:14 AM > To: Strongtalk-general > Subject: Re: How do tagged data structures work in Strongtalk? > > > > On May 27, 10:38 pm, nicolas cellier <[email protected]> wrote: > > What about something like VW SmallDouble on a 64 bits machine? > > (two tag bits taken from exponent i think) > > Tagged doubles have the same advantage than unboxed doubles: They > bypass allocation. Their advantage is that they don't break the object > model. But strongtalk works only for x86-32 and will stay like that > for quite some time. > > Btw, I think we should get rid of the unboxed doubles in smalltalk > code. Sure, they currently show us the cost of allocation for 64bit fp > computation, and they are useful for that, but the strongtalk compiler > is made to overcome this in the long term. For instance, with some > escape analysis it would be easy to enable object recycling in > compiled code, and thus remove most of the allocated doubles in > computations. Life analysis can easily infer that for many doubles we > allocate, old ones die, and thus you can reuse them (eg: z_im := two * > z_re * z_im + c_im). Conceputally, it's like changing +/-/* operators > into +=/-=/*=. It doesn't change semantics because the objects we > recycle are garanteed to be garbage. > > It makes little sense to keep unboxed doubles in a smalltalk system > like strongtalk, whose emphasis is achieving good performance on > idiomatic smalltalk code. You will find under the "computation" > category of the Mandelbrot class several exemples of the general code > I would like to avoid. Yes, I agree that the unboxed doubles in Strongtalk right now do not fit with the language model. They were not planned part of the project in the first place; they were simply an experiment that Robert Griesemer did on his own because he felt it was easy to do- we discussed this at the time, but clearly a general model that matches Smalltalk semantics is a lot more work, and isn't going to happen anytime soon. And anyway, many things are higher priority than this right now. Cheers, Dave --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Strongtalk-general" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/strongtalk-general?hl=en -~----------~----~----~----~------~----~------~--~---