Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I tried a similar experiment recently w/ FFT transform for wav files in the browser and javascript was faster than wasm. It was mostly vibe coded Rust to wasm but FFT is a well-known algorithm so I don't think there were any low hanging performance improvements left to pick.


It looks like FFTW3 is working on wasm support: https://github.com/FFTW/fftw3/issues/293

You could also try pretty fast fft: https://github.com/JorenSix/pffft.wasm


It was just an experiment in vibe coding. It's easy enough to try different architectures w/ AI coding but what I wanted to see was whether naive numeric calculations were faster w/ wasm or javascript & it turned out that javascript was faster so the performance trade-off between wasm & javascript is not as simple as between a high-level language like python & SIMD optimized C/assembly.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: