Hacker News new | ask | show | jobs
by peterth3 1592 days ago
Levenstein distance with WASM is 40% faster in the benchmarks on the linked medium article.

WASM (145,086 ops/sec)

JavaScript (102,775 ops/sec)

https://medium.com/netscape/javascript-c-modern-ways-to-use-...

2 comments

And that's another thing about JavaScript engines--they evolve and usually result in better performance. The article is written in 2017 and the results are from Node.js of the time, meanwhile the results in the repository are from the last year.
Can confirm, I ran the benchmark in that repo and rather than JS being 30% faster in Levenstein distance it was ~10% slower but both had improved relative to the native score.
Is it a naive recursive implementation or the matrix formulation?