Skip to Main Content
Talk Beginner Apache 2.0

One Codebase, Two Runtimes: The Promise and Perils of Isomorphic Scientific Computing in Node.js

Proposal status is Approved
Session Description

For the last twenty years, scientific computing has largely followed a single assumption: computation belongs on servers, clusters, or specialized environments.

Node.js quietly breaks that assumption.

Today, a numerical library published to npm can run inside a datacenter, a browser tab, an Electron application, a notebook environment, or an edge runtime. No recompilation. No language switch. No separate implementation.

This sounds obvious until you start asking uncomfortable questions.

Can the same statistical algorithm produce identical results across V8, SpiderMonkey, JavaScriptCore, and WebAssembly? What happens when compiler optimizations disagree? When floating point edge cases diverge? When native dependencies disappear?

This talk explores the strange reality of isomorphic scientific computing. We will look at what happens when numerical software stops belonging to a machine and starts belonging to an ecosystem.

Along the way, we'll discuss why JavaScript may be the first mainstream platform where scientific software can be distributed the same way we distribute web applications, and why achieving that vision is much harder than it initially appears.


To make sure beginners are also familiar with the concepts, the talk will also go through some demos in the initial part.

Key Takeaways
  1. One codebase really can run everywhere. A numerical library published to npm can run unchanged in Node.js, browser tabs, Deno, Electron and notebooks, with no recompiling and no rewrite in another language.
  2. Built-in Math isn't reproducible. The JavaScript spec doesn't fix the algorithms or the precision for Math.*, so V8, SpiderMonkey and JavaScriptCore can give different answers.
  3. Portability and performance can work together. A pure JavaScript core with optional native add-ons and WebAssembly builds, which fall back automatically, gives speed where it's available and correctness everywhere.

References

Session Categories

Introducing a FOSS project or a new version of a popular project
Technology architecture
Engineering practice - productivity, debugging
Talk License: Apache 2.0

Speakers

Gunj Joshi
Gunj Joshi Core developer | stdlib

Gunj Joshi is a core developer of stdlib, the JavaScript standard library for numerical and scientific computing. His work spans special mathematical functions, implementations of FFTs, and automated generation of high-performance packages at scale. He has previously worked with IBM Research around Quantum Computing, with Quansight and Google Summer of Code around open source software, and currently works at a hedge fund.

Reviews

Approving this one. It's a talk very few people could give. Since it's tagged Beginner and many in the room will be students, please share a short outline and 3 clear takeaways (that section is empty right now), and start with one or two simple demos so beginners can follow before you get into how results differ across runtimes.

Reviewer #1 Approved