[Vm-dev] change to struct foo {} fum declaration

David T. Lewis lewis at mail.msen.com
Thu Dec 2 23:33:20 UTC 2010


On Fri, Dec 03, 2010 at 12:12:20AM +0100, Igor Stasenko wrote:
> 
> On 2 December 2010 23:30, Esteban Lorenzano <estebanlm at gmail.com> wrote:
> >
> > Hi,
> > As part of my new role, I'm still trying to compile and understand all the building process... and testing with a 5.x produced I found that the tiny benchmarks for my vm and for the 5.x series was significantly worse than it's predecessors (4.x). The difference is significative (32 million send in 5.x/44 million send in 4.x). Trying several optimizations with John, he found that changing the declaration:
> >
> > struct foo { ... } fum;
> >
> > to
> >
> > static struct foo { ... } fum;
> >
> > speeds the execution, up to 48 million send, ??which is very reasonable.
> >
> > So, I want to change the default definition of fum variable (to "static struct foo").
> > What do you think?

This change sounds fine to me. Esteban, please feel free to make
the update to VMMaker on SqueakSource (or I will be happy to do it
on your behalf if you prefer, just let me know). Eliot will probably
want to make the corresponding change in the oscog branch of VMMaker
on SqueakSource.

> >
> +1
> it could change depending on compiler.. some could compile 'static' to
> be more slower than auto.
> and that's what we should live with.

If it turns out to be an issue on some platforms, we can alway change
it later, maybe using a macro that would be set at compile time. So
no reason not to make the change now.

Thanks!

Dave



More information about the Vm-dev mailing list