On Wed, 5 Sep 2018 at 10:44, Craig Latta <craig@blackpagedigital.com> wrote:

     Oops, here's a more clearly-worded version...

     It's convenient to run JS code on the fly from within SqueakJS via
Web Workers. So let's run some benchmarks. :) The test: What's the
highest Fibonacci number you can calculate in one second? Each result is
that number, and then how much faster other systems are. "JS" refers to
JS code running in a Web Worker forked by SqueakJS, "ST" refers to
running the test in Smalltalk in SqueakJS.

     laptop native Cog on macOS: 40 (baseline)
     laptop Chrome JS: 34 (laptop native Cog on macOS is 17x faster)
     mobile Safari JS: 33 (laptop Chrome JS is 1.5x faster)
     laptop Chrome ST: 29 (laptop Chrome JS is 12x faster,
                           mobile Safari JS is 8x faster)
     mobile Safari ST: 24 (mobile Safari JS is 22x faster,
                           laptop Chrome ST is 3x faster)


Cool!

What's the overhead of the WebWorkers? I mean compared to just running the JS code from SqueakJS:

JS at: 'fib' put: (JS Function new: 'n' with: 'return n <= 1 ? n : fib(n-1) + fib(n-2)').
JS fib: 38
==> 39088169

- Bert -