Neat example and nice demo of the playground (prototype version).

I haven't done much performance testing on the playground. I was expecting
the playground to be a large order of magnitude slower than J904. I was
pleasantly surprised to this example is 2x slower on the playground, which
is in line with what the emscripten website says (noted below)

On my machine:

JVERSION

Engine: j904/j64avx2/windows

Beta-a: commercial/2022-04-09T17:57:22

Library: 9.04.01

Qt IDE: 2.0.3/6.2.4(6.2.4)

Platform: Win 64

Installer: J904 install

InstallPath: c:/users/joebogner/downloads/j904

Contact: www.jsoftware.com



(6!:2) 'plot bspir 10000'

0.253758


vs the playground


Google Chrome 96.0.4664.110 (Official Build) (64-bit) (cohort: Stable)
Revision d5ef0e8214bc14c9b5bbf69a1515e431394c62a6-refs/branch-heads/4664@
{#1283}
OS Windows 10 Version 20H2 (Build 19042.1415)
JavaScript V8 9.6.180.21


   (6!:2) 'plot bspir 10000'
0.507

From emscripten: https://emscripten.org/docs/optimizing/Optimizing-Code.html


"Emscripten-compiled code can currently achieve approximately half the
speed of a native build. If the performance is significantly poorer than
expected, you can also run through the additional troubleshooting steps
below:"


"Generally you should first compile and run your code without optimizations
(the default). Once you are sure that the code runs correctly, you can use
the techniques in this article to make it load and run faster."

I tried compiling with -O3 (
https://github.com/jsoftware/j-playground/blob/j903_wasm/jsrc/makefile.html#L7)
and it didn't make any appreciable difference


So, I went back to the default options of emscripten while we continue to
focus on correctness. My guess is that any speedup will come from J code
and not tweaks to the C->JS compilation (emscripten) since it seems to be
in line with general emscripten expectations.



Are you seeing drastically different times on your machine?







On Mon, May 16, 2022 at 8:12 PM Raul Miller <rauldmil...@gmail.com> wrote:

> https://rosettacode.org/wiki/Babylonian_spiral
>
> The online J version is significantly slower than the online phix version.
>
> Does anyone feel like working on this?
>
> Thanks,
>
> --
> Raul
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to