I don't know if this is of any general interest, but attached is a
gprof output listing of a Squeak VM with the memory access routines
from sqMemoryAccess.h recoded in Slang.
I now have the Slang inlining working so that it can fully inline all
of these methods. With the Slang inlining activiated, performance is
essentially identical to that of the normal macros in sqMemoryAccess.h.
By turning the Slang inlining off, the functions are all called
individually, which is what I used to generated the attached profile.
The host is 64-bit Linux AMD. The profile was run by opening a largish
image, running "0 tinyBenchmarks" a half dozen times, and exiting the
image without saving.
So far, the advantages of putting the memory access routines into
the image as Slang seem to be:
- You can step into the methods in a debugger
- The methods can be profiled
- Exposes type declaration problems previously hidden by the macros
Is anyone interested in this?
Dave