<div dir="ltr">---------- Forwarded message ----------<br><div class="gmail_quote">From: <b class="gmail_sendername">ghost</b> <span dir="ltr">&lt;<a href="mailto:ghost@major2nd.com">ghost@major2nd.com</a>&gt;</span><br>Date: Wed, Jun 1, 2016 at 12:12 PM<br>Subject: [<a href="mailto:vm-dev-owner@lists.squeakfoundation.org">vm-dev-owner@lists.squeakfoundation.org</a>: Re: Amazing ARM simulator experience]<br>To: <a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a><br><br><br>Eliot, please pass this along to the mailing list if you like. Thanks- P.<br>
<br>From: ghost &lt;<a href="mailto:ghost@major2nd.com">ghost@major2nd.com</a>&gt;<br>
To: Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt;<br>
CC: <a href="mailto:vm-dev@lists.squeakfoundation.org">vm-dev@lists.squeakfoundation.org</a><br>
In-reply-to: &lt;<a href="mailto:CAC20JE1dBwTXJNxOaiLbwhU8O8eeTV4Wg_AJtUSuA2ZO4bkKtA@mail.gmail.com">CAC20JE1dBwTXJNxOaiLbwhU8O8eeTV4Wg_AJtUSuA2ZO4bkKtA@mail.gmail.com</a>&gt;<br>
        (message from Eliot Miranda on Wed, 1 Jun 2016 10:43:24 -0700)<br>
Subject: Re: Amazing ARM simulator experience<br>
Date: Wed,  1 Jun 2016 12:11:29 -0700 (PDT)<br>
<br>
Eliot,<br>
<br>
I can&#39;t top your adventure, but I have a similar experience to share.<br>
<br>
As part of work I was doing on binary code decompilation, for each ISA I had<br>
to build a translator from binary code into something fairly close to C<br>
parse trees.  Now, I didn&#39;t intend these trees to be used for anything other<br>
than analysis, but it turned out to be pretty easy to actually execute them.<br>
The project is all written in JavaScript*, and compiling the trees into<br>
JavaScript code turned out to only require a few hundred lines of code<br>
because the primitives are all very low-level and there aren&#39;t many of them.<br>
So what we have here is binary code, decompiled into machine-oriented<br>
JavaScript, which is then executed by Google&#39;s v8 JIT compiler.<br>
<br>
My primo test case was Ghostscript executing &quot;-dNODISPLAY -c 3 4 add =<br>
quit&quot;, which doesn&#39;t look like much but does require loading and<br>
initializing the entire graphics rendering system (a good deal of which is<br>
written in PostScript and interpreted by GS).  This took 522M ARMv7<br>
instructions in 472 seconds, or a bit over 1 MIPS, on a 2014-era x86/64<br>
workstation.  I wasn&#39;t sure whether to be more impressed by v8, or appalled<br>
by how much work GS had to do to get up to speed.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
<br>
L Peter Deutsch &lt;<a href="mailto:ghost@major2nd.com">ghost@major2nd.com</a>&gt; :: Aladdin Enterprises :: Healdsburg, CA<br>
<br>
         Was your vote really counted?  <a href="http://www.verifiedvoting.org" rel="noreferrer" target="_blank">http://www.verifiedvoting.org</a><br>
----------------------------------------------------------------<br>
*If you want to discuss the choice of JavaScript as implementation language,<br>
please e-mail me privately. :-)<br>
</font></span></div><br>
</div>