[squeak-dev] re: would it be fun to implement Squeak (and SPOON!)
on this hardware?
David T. Lewis
lewis at mail.msen.com
Sun Dec 22 17:20:56 UTC 2013
On Sat, Dec 21, 2013 at 07:20:39PM -0500, Jon Hylands wrote:
> On Sat, Dec 21, 2013 at 5:24 PM, Craig Latta <craig at netjam.org> wrote:
>
> >
> > Hi Jon--
> >
> > > I just bought a Teensy 3.1 from pjrc.com <http://pjrc.com>. Its got an
> > > ARM overclocked at 96 MHz, with 256 KB of FLASH, and 64 KB of RAM,
> > > plus a huge pile of hardware features built in. It was $20, and looks
> > > like one of those old basic stamps. Right now I'm programming it with
> > > the Arduino IDE, but its another platform that would be cool to run
> > > something like Little Smalltalk or Spoon on.
> >
> > A 32-bit processor, nice! The next hurdle is getting the VM down to
> > below 256 KB. To date there hasn't been an effort to make the VM small,
> > as far as I know. Currently the VM is at least a megabyte on every
> > platform, yeah?
> >
>
> Well, the thing you have to realize, on a platform like this (no OS, no
> file system, just a bare chip), there's a lot of stuff in the VM that we
> could get rid of. All the graphics stuff, file support, sockets, etc. You
> would want to keep the serial port support, and probably add support for
> other hardware peripherals. I don't think it would be impossible to get the
> VM down to a very small size, but I've never really played with it, so I
> can't say for sure.
>
> Basically, you'd want the interpreter, the garbage collector, and enough
> primitives to support a very basic class library. Plus support for the
> hardware peripherals on the chip (UART, SPI, I2C, Digital I/O, A/D, PWM,
> Timers, etc)
For a minimal interpreter VM with all plugins external, compiled on a 64-bit
Linux system with default optimization, it looks like this:
$ size *
text data bss dec hex filename
70693 816 208 71717 11825 so.B2DPlugin
43657 528 5864 50049 c381 so.BitBltPlugin
22951 1060 4328 28339 6eb3 so.FilePlugin
52198 1728 608 54534 d506 so.SocketPlugin
6207 1136 16 7359 1cbf so.vm-display-null
104748 4204 7392 116344 1c678 so.vm-display-X11
2957 768 16 3741 e9d so.vm-sound-null
247625 8292 166056 421973 67055 squeakvm
The squeakvm size gives some indication of how big the interpreter,
garbage collector and interpreter primitives are. A good deal of the
code size is associated with inlining of the code in the Smalltalk
to C translation. If size were the only concern, you can reduce this
considerably, but the performance impact makes this unacceptable (the
slang inliner is remarkably effective). It would be somewhat smaller
if compiled in 32bit mode also.
Dave
More information about the Squeak-dev
mailing list
|