[Vm-dev] Numbered primitives (was: Cog Primitive Performance)

Clément Bera bera.clement at gmail.com
Wed Apr 19 00:57:46 UTC 2017


On Tue, Apr 18, 2017 at 3:41 PM, David T. Lewis <lewis at mail.msen.com> wrote:

>
> On Tue, Apr 18, 2017 at 09:57:54AM -0700, Cl??ment Bera wrote:
> >
>
> <snip>
>
> > For each primitive, we need to evaluate the performance with and without
> > the primitive. In each case, we either move the primitive to numbered
> > primitive or we just use normal Smalltalk code.
>
> Please no more numbered primitives. We should be eliminating numbered
> primitives,
> not adding more.
>
> The only justification I can see for a numbered primitive today is to
> identify
> it as one of the small number of primitives that absolutely must be
> available
> when porting the VM to a new platform, especially if that platform may not
> easily support the loading of functions by name. Aside from that, we should
> insist that /all/ primitives be named primitives.
>

Ok.

The problem is that right now the JIT compiles to machine code only
numbered primitives (in fact only numbered primitives specifically
annotated in the primitive descriptors of Cogit). Other primitives require
the VM to switch to the interpreter C stack to be called. If someone
extends the JIT to compile named primitive then we could consider doing it
that way.


>
> Dave
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20170418/ca80ff33/attachment.html>


More information about the Vm-dev mailing list