Post Reply 
Public Beta Availiable - Win/Firmware
04-17-2021, 07:47 PM (This post was last modified: 04-17-2021 07:57 PM by Jean-Baptiste Boric.)
Post: #38
RE: Public Beta Availiable - Win/Firmware
I'm aware that these numbers won't translate directly to giac, but they do give an idea of the overhead of WebAssembly vs. native for general-purpose code (eigenmath doesn't use any libraries, it's self-contained). I expect optimized libraries like GMP would take a greater performance hit, but maybe native versions from the firmware could be exported for consumption by WebAssembly modules if required for performance reasons.

For isprime(2^4253-1), according to eigenmath's source code it looks like Miller–Rabin primality test (don't quote me on that, I'm loosely correlating things with the help of Google). Maybe it has been tuned differently? Maybe GMP's generic routines don't mix well with WebAssembly inside the toolchain? Maybe Firefox's JIT engine has a hard time dealing with it? Maybe it's a combination of the above or some other factors? Who knows, but I'm way out of my comfort zone here to make any conclusions.

Anyways, I'm probably not the right person to benchmark computer algebra systems in the first place since I suck at algebra... giac should be benchmarked too, preferably with both a pure WebAssembly build of GMP and an exported native build of GMP if it's doable, to have an idea of the performance levels we can expect with a WebAssembly solution. However, it sounds like GMP could be a sizable performance bottleneck, but unlike a web browser context here we do have more options to address that.

Note that we haven't talked about the implications for exam mode, but that is a whole another set of problems I'm not looking forward to discuss.

I can't reuse your wasm builds of giac for these tests because these runtimes target WASI (WebAssembly System Interface) instead of a web browser. The imports simply don't match up, a specific port (or at the very least build) is required.
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: Public Beta Availiable - Win/Firmware - Jean-Baptiste Boric - 04-17-2021 07:47 PM

User(s) browsing this thread: 1 Guest(s)