apache / arrow-rs

Official Rust implementation of Apache Arrow
https://arrow.apache.org/
Apache License 2.0
2.57k stars 771 forks source link

WASM in Browser Performance Improvements #6570

Open brettsaunders21 opened 1 week ago

brettsaunders21 commented 1 week ago

Which part is this question about

Library performance when compiled for Web Assembly in the browser

Describe your question

We're building a browser based library with WASM to power a tabular data display in the browser. The plan is to allow the user to carry out actions like filter, sort, split/pivot and group-by

We've looked at libraries like polars, duck-db and data fusion, but they all seem to have a large footprint when compiled to WASM. Or there features like group by don't work quite right for us

We've been using this library so far to back our library, but would like to get the most performance out of it we can. So have the follow three questions

Additional context

tustvold commented 1 week ago

https://github.com/apache/arrow-rs/pull/6554 is probably relevant. I'm not hugely knowledgable about WASM's SIMD support, but presuming you set the appropriate target CPU it should work.

As for performance/support, I know people use this library in WASM contexts but it hasn't been a major development focus, and I am afraid I don't have any benchmarks. There are also possibly some kernels that assume 64-bit architectures, given this isn't actually tested, bugs may be present related to this.

That being said, efforts in this space are appreciated