Re:The Python scientific stack, compiled to WebAssembly
by makmanalp on Friday August 24, 2018 @12:15PM
(#17835845)
I can't believe I'm saying this but it would be neat to have a browser native BLAS, or absent that perhaps cross-compiled to WASM from a RUST implementation or something! Makes me think of all the demos like the tensorflow playground (dunno if all that happens in the browser or not).
Re:The Python scientific stack, compiled to WebAssembly
by TAForObvReasons on Friday August 24, 2018 @03:27PM
(#17837267)
People are working on the pure JS version of BLAS: https://github.com/jacobbogers/blasjs . Hopefully that work leads to best practices and a standard
Re:The Python scientific stack, compiled to WebAssembly
by xtrapolate on Saturday August 25, 2018 @02:38AM
(#17839861)
Numpy is fast thanks to having much of its code compiled as a native library.
They were purposefully working to reduce abstraction, since performance mattered from day one.
WASM is a huge step backwards in that regard. If you care about performance, just install Python on your box and "pip install numpy". Do you absolutely have to have it come in a browser now?
Re:The Python scientific stack, compiled to WebAssembly
by singularity2001 on Friday August 24, 2018 @01:11PM
(#17836231)
Interesting, how do you derive at "4-10x slower"?
Running the exported notebook here takes
time py3 python.py real 0m0.145s
chrome: load html: 2sec run html: 13sec!
That's not 10 times slower, but a 100 times slower!
Still good start.
Re:The Python scientific stack, compiled to WebAssembly
by lootsauce on Friday August 24, 2018 @02:16PM
(#17836723)
I have used Weblas "GPU Powered BLAS for Browsers" for matrix multiply and it smokes!
https://github.com/waylonflinn/weblas
Re:The Python scientific stack, compiled to WebAssembly
by travisoneill1 on Friday August 24, 2018 @02:51PM
(#17837007)
Did you use js typed arrays (e.g. Uint32Array) to benchmark large array operations or just Array?
The real impressive feat to me isn't hosting jupyter in the browser. It's access to a reasonably fast implementation of numpy in the browser which smokes native JS code for homogeneous array operations. I would love to see a minimalistic WASM implementation of numpy that can seamlessly interop with normal JS. Such a library would open up all sorts of possibilities that aren't currently feasible due to perf reasons.