\n
MongoDB Compass has logic for sample field analysis. This was originally written in Javascript, but due to the limitations of Javascript. The operation could only relistically run on about 1000 documents before it got too slow. The team then proceeded to do a rewrite of their sample field analysis in Rust / Wasm. They saw a 40.33x speed increase (121000ms in Javascript, 3000ms in WebAssembly) with their new Wasm implementation. This is because Wasm is great for computationally intensive tasks. Please see the talk in Additional resources for more information.
\n