[self-interest] memory size
Jecel Assumpcao Jr
jecel at lsi.usp.br
Tue Oct 20 01:56:29 UTC 1998
One of the main complaints I hear about Self is that it takes up
too much memory (the other is that it only runs on Sparcs). Since
I see people buying entry level machines with 64MB of RAM or more
perhaps this isn't as much of an issue as it used to be. What
follows is a comment on the implemenation details of Self and
probably won't make any sense to someone who is unfamiliar with
I was looking at a paper to be presented at Micro'98 by Karel
Driesen and Urs Hoelzle (called "The Cascaded Predictor:
Economical and Adaptive Branch Target Prediction") and found it
interesting to note the parallels between their problems and
the implementation of Self.
One source of code bloat is excessive customization. When you
generate dozens of copies of native code, all alike, you are
wasting time as well as memory. In the same way, the UCSB guys
noted that when you use two level branch prediction hardware
(the moral equivalent of customization) you end up with many
entries that are really all alike. They added a filter that tries
to discriminate between branches that can be handled in one
level (not customized) and those that get better results in
two levels (customized). This allowed them to get by with two
small memories (one for each case. Not really, but read their
paper if you really need to know ;-) instead of one huge one.
This reminded me of an idea I worked on last year. The idea is
that compiled native code would be shared between different
objects (not a problem with PICs as they do their type checks
on the caller side, it but does require multiple headers for ICs).
This would happen as long as all lookups for messages to self
gave the same results (for the different objects). This would
have to be tested recursively (any self messages must invoke
native methods that are also shared). If this test fails, then
a new (customized) native code must be generated for the current
object, otherwise just a new header will be enough.
I don't have any data on how much memory this would save, but
hope to work on this soon. Anyway, avoiding another customized
version of a method not only saves some space but replaces the
compilation with just the lookups for implicit self messages.
Subscribe, unsubscribe, opt for a daily digest, or start a new e-group
at http://www.eGroups.com -- Free Web-based e-mail groups.
More information about the Self-interest