[BC] Block Closures, Version 2
ajh18 at cornell.edu
Thu Feb 14 17:27:24 UTC 2002
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?
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
currentBytecode. All customizing cases were small enough for this,
especially after considering cases that goto to a shared label (the
CCodeGenerator used to assumed that the shared code was part of each
case and therefore did not customize). Also, I put in a work around to
prevent gcc from over optimizing. Just because of a few cases (like
jumpIfTrue and pushFalse) gcc was prefetching trueObj and falseObj into
registers at the end of every bytecode case. I faked gcc out by using a
local temp version of trueObj and falseObj in key places instead. Many
of these enhancements are independent of BC and live in a separate
changeset that can be used on the standard VM. See
CGeneratorEnhancements-ajh.cs on the BC page.
> Anyways, what are you asking for?
> 1. For me to do a quick check to see if integration can be done easily?
> 2. For me to keep (and maintain) an updated patch for BCv2, until BCv2 has
> stabalized, then integrate it into the image.
> 3. For me to create a patch thats ready for the current version, integrate
> it now, and be done with it?
> 4. For me to do nothing, then when BCv2 is ready for integration, I update
> the patch and install it then?
#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.
> For #2, not desireable, I have some bad-news on that front (forthcoming)
What's the bad news?
More information about the Squeak-dev