DE version is available. Content is displayed in original English for accuracy.
Advertisement
Advertisement
⚡ Community Insights
Discussion Sentiment
100% Positive
Analyzed from 216 words in the discussion.
Trending Topics
#numba#browser#numpy#python#faster#sure#write#version#years#color

Discussion (5 Comments)Read Original on HackerNews
Sure you could write Cython but then you have to have a build step and make wheels for every platform you and python version. Sure numpy has gotten faster over the years but you're still hampered by the GIL.
Numba is a little magic because you get to write stuff that feels like numpy, but get literal bytecode perf.
BUT there's a cost to this, which u learned the hard way when I imported a color map extension for matplotlib recently.
I thought i was going to be importing a couple megabytes at most. But Numba+llvmlite alone is almost 100MB!
This might be a drop in the bucket in some applications but for a color map library that has only two hot paths that need to be JITed, it's excessive.
Overall though, love this achievement, and i love what's being done for in-browser (aka local-first) scientific computing!
I had experimented with a similar idea in an infinitely more primitive way more than ten years ago (https://cyrille.rossant.net/numpy-browser-llvm/). I'm glad to see so much progress since then.
> Numba delivers a roughly 250Ă— speedup in WebAssembly, compared with about 90Ă— natively.