globals as structure
Tim Rowledge
tim at sumeru.stanford.edu
Wed Nov 20 22:33:22 UTC 2002
Marcel Weiher <marcel at metaobject.com> is claimed by the authorities to have written:
> By the way, couldn't passing the pointer to the interpreter struct to
> each function be faster still? After all, registers are probably
> plentyful, and that would eliminate access to the global structure
> pointer. Of course, that would mean altering the signature of the C
> functions.
It's likely to be very cpu specific - remember, x86s only have three (or
is it four, or five?) registers not already dedicated to something or
other. PPC has quite a few, ARM has a modest surplus, Alpha has a
gazillion etc etc. It's one of those details that one ought to be able
to leave to a compiler but can't really trust completely.
Notwithstanding that matter it would be nice to pass args etc to the
primitives in a 'normal' manner so that we could take advantage of the
cpus calling conventions properly.
tim
--
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
"Bother," said Pooh, as he fell into the nitric acid bath.
More information about the Squeak-dev
mailing list
|