[BC] Block Closures, Version 2

Scott A Crosby crosby at qwes.math.cmu.edu
Thu Feb 14 18:56:52 UTC 2002


On Thu, 14 Feb 2002, Anthony Hannan wrote:

> Scott A Crosby <crosby at qwes.math.cmu.edu> wrote:
> > On Thu, 14 Feb 2002, Anthony Hannan wrote:
> > Sweet... Hey, I've got some profiling that is now indicating that the
> > interpreter is actually starting to spend serious time (a few PERCENT!!)
> > just pushing self and local variables from the stack, which is good news.
> > It indicates that the bytecode main loop is actually starting to suck a
> > non-apreciable amount of time, which means that everything else is going
> > extremely well.
> > Does BC v2 makes those cheaper, due to the using a cheaper stack?
>
> How does one make a "cheaper" stack?

Cheaper bytecode main loop?

Maybe a shared stack, for both locals and temps, rather than several
stacks/vectors for locals, args, and temporaries. This would likely help
with the CPU caches. (I'm not sure what squeak does, nor how your version
changes this. I'm just elaborating what I meant.)

use 'CFLAGS=-pg -g' and 'gprof' 'gprof -l' to get the results. Very very
useful for identifying whats going on.

> The main ingredient to my speed ups this time was generating better C
> code.  I eliminated sharing interpret() temps across bytecode cases,
> allowing the C compiler to optimize temps locally replacing them with
> registers.  Also, every bytecode case is customized, hard coding

Excellent!

> > 3. For me to create a patch thats ready for the current version, integrate
> > it now, and be done with it?
>
> #3 please for BCv2. Once you post your changesets (see the BC page) I
> will maintain them and keep them up to date with BC.

Building and translating a new VM to test them now.. They'll be sent in
about an hour or so. The annoying thing is the limitations in the tools,
anytime a changeset alters instance variables, it 'locks' the instance
variables into the changeset. Thus, its annoying to maintain two sets of
changesets on some object, where both add a different subset of instance
variables.

You'll see some of that if you try integrate the ones I send.

>
> > For #2, not desireable, I have some bad-news on that front (forthcoming)
>
> What's the bad news?
>

Well, might as well give it now..

Its good news for me, but bad news for squeak work.. I got into grad
schools, two so far. (Rice&UIUC) Thus, I will be researching their
programs, visiting them, and choosing between them over the next couple of
months. Also, my job-related project is becoming more active. Together,
I'm about to get somewhat more busy.


Scott






More information about the Squeak-dev mailing list