Jesper,

I find myself in rare but mild disagreement about your claims for
stack-based virtual machines. Please have a look at this short paper about
the Dis VM from Inferno: http://flint.cs.yale.edu/jvmsem/doc/inferno.ps

We found a JIT for Dis could be tiny, especially compared to Java JITs, and
at the time outperformed Java.

-rob

On Tue, Feb 20, 2018 at 12:26 AM, Jesper Louis Andersen <
jesper.louis.ander...@gmail.com> wrote:

> On Sun, Feb 18, 2018 at 4:47 AM Lars Seipel <lars.sei...@gmail.com> wrote:
>
>>
>> Go already has a NaCl backend which might fit the bill. See
>> misc/nacl/README for how to set it up. It links to a design document
>> (https://golang.org/s/go13nacl) with some background.
>>
>>
> The sucessor of that project is WebAssembly.
>
> WebAssembly is a really good design, where the virtual machine is formally
> specified, with a testbed implementation in Ocaml. One of the defining
> features is that the VM is a stack-vm with a twist:
>
> * Stack-based VMs usually have smaller opcodes (since you don't have to
> specify registers to operate on)
> * Stack-based VMs are usually easier to target
> * WebAsm's VM is built in a way such that the layout of the stack is
> statically known at compile time.
>
> The latter means that you can compile it to a register-based VM, which
> tend to be faster at execution.
>
> Ok, C programs can only be implemented in it if you provide a shadow
> stack. But given that C generally allows too much of the programmer, this
> is perfect :) Also note, I don't think Go would need a shadow stack, but
> there might be a subtlety somewhere which mandates it.
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to