NumberedPrimitives must die! (Was: Re: [Vm-dev] VM Maker:
leves at caesar.elte.hu
Mon Jul 11 20:13:57 UTC 2016
On Mon, 11 Jul 2016, tim Rowledge wrote:
>> On 11-07-2016, at 10:49 AM, Levente Uzonyi <leves at caesar.elte.hu> wrote:
>> IIRC numbered primitives are still a lot quicker (in some important cases), because they can directly access the VM internals. I may be wrong though.
> Nah, once the primitive is ‘captured’ and the function pointer is installed in the appropriate place there is no difference at all. The only difference these days is that *external* modules are a tiny bit slower because they have to go via the interpreterProxy to query or set vm stuff. Internal modules directly pillage the vm. I *think* that it’s an OS issue really - for example it would be easy under RISC OS to make external modules use the same approach as internal ones and the runtime loader would deal with the connecting of addresses. Surely other OSs could do something like that?
You're right. Still, the use of interpreterProxy in external modules makes
it impossible to do some optimizations.
> It’s not the number/name difference that is important here.
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> Strange OpCodes: REP: Randomly Execute Programmers
More information about the Vm-dev