<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"><span style="font-family:Arial,Helvetica,sans-serif;color:rgb(34,34,34)">On Wed, 5 Sep 2018 at 10:44, Craig Latta <<a href="mailto:craig@blackpagedigital.com">craig@blackpagedigital.com</a>> wrote:</span><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><br>
     Oops, here's a more clearly-worded version...<br>
<br>
     It's convenient to run JS code on the fly from within SqueakJS via<br>
Web Workers. So let's run some benchmarks. :) The test: What's the<br>
highest Fibonacci number you can calculate in one second? Each result is<br>
that number, and then how much faster other systems are. "JS" refers to<br>
JS code running in a Web Worker forked by SqueakJS, "ST" refers to<br>
running the test in Smalltalk in SqueakJS.<br>
<br>
     laptop native Cog on macOS: 40 (baseline)<br>
     laptop Chrome JS: 34 (laptop native Cog on macOS is 17x faster)<br>
     mobile Safari JS: 33 (laptop Chrome JS is 1.5x faster)<br>
     laptop Chrome ST: 29 (laptop Chrome JS is 12x faster,<br>
                           mobile Safari JS is 8x faster)<br>
     mobile Safari ST: 24 (mobile Safari JS is 22x faster,<br>
                           laptop Chrome ST is 3x faster)</blockquote><div><br></div><div><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">Cool!<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">What's the overhead of the WebWorkers? I mean compared to just running the JS code from SqueakJS:</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"><div class="gmail_default"><div class="gmail_default">JS at: 'fib' put: (JS Function new: 'n' with: 'return n <= 1 ? n : fib(n-1) + fib(n-2)').</div><div class="gmail_default">JS fib: 38</div><div class="gmail_default">==> 39088169</div><div><br></div><div>- Bert -</div></div></div></div></div></div></div></div></div>