Millisecond clock resolution for DateAndTime now

Tim Rowledge tim at sumeru.stanford.edu
Tue Sep 28 03:28:42 UTC 2004


John Pierce <john.raymond.pierce at gmail.com> wrote:

> > If you feel like trying to do it, feel free. Remember platform
> > portability issues, document it, think of sensible SUnit tests for it,
> > write it all, send it to me, remind me to review it and it will get
> > into the soonest available alpha VMMaker release. If people like it, it
> > gets to stay in for beta and release.
> 
> So -- my first question is should this be a VM mod or just a plugin? 
> I started reading about how to mod the VM and I see that the common
> wisdom these days is to just provide a plugin instead of requiring
> folks to integrate VM changes?  Thoughts?
Could go either way on something like this; it seems doable as a plugin
but given that timing is a pretty basic function I'd be quite happy to
have it as a numbered prim. It's not like we're short of numbers right
now.

There's no performance cost (modulo any platform issue with the calling
of an external prim, not something I've seen in practise) any more for
external calls after the first instance (when the plugin is loaded)
since the derived function pointer goes into the mCache. Mmm, actually
it doesn't yet - that's for the next release. Right now the 3.7 VM
uses the external prim table to store the function pointers it derives
when loading. So anyway, _next_ time there will be no performance cost.

Advantage of a plugin? A simpler compile for you, simple testing etc.

tim
--
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Useful random insult:- Has his brain on cruise control again.



More information about the Squeak-dev mailing list