[Q] Project: Better performance for LargeIntegers

David T. Lewis lewis at mail.msen.com
Sat Oct 30 14:18:12 UTC 1999


On Sat, Oct 30, 1999 at 11:29:20AM +0200, Stephan Rudlof wrote:
> >
> > Thus, a plugin could in theory be built (without too much sweat) that
> > wouldn't slow up the status quo much at all, and would run much
> > faster with a plugin installed.
> 
> Why not to use primitives? There are some free numbers (20-39) for this
> purpose and if it's faster then everybody will want it. And I don't see any
> image or sources size problem for these additions.
>

Actually, it turns out that it's easier to write pluggable primitives
than to write the normal kind, once you get the hang of it.  In my first
amateurish attempts to write some primitives (for what later became the
OSProcess plugin), I found that I was dealing with about a twenty minute
compile time on my Linux Pentium 100 computer. This included generating
the C code and building the new VM, and most of this time was taken in
generating and building interp.c.

Once I figured out how to write the primitives in a pluggable module, I
found that the whole thing can be done under a minute. This is because
you only need to generate and build your plugin module, and the rest of
the VM is untouched.

Now, don't get me wrong, there are real advantages to a twenty minute
compilation cycle. Combined with a good cup of coffee, it really focuses
the mind. None of this business of "let's just try this one little
change and see what happens," you really need to plan ahead. But for
testing a few new primitives, try doing it in a plugin and you'll save
yourself a lot of time.





More information about the Squeak-dev mailing list