Hacker GitHub

← All repos

christianscott/levenshtein-distance-benchmarks

View on GitHub ↗ ★ 23 JavaScript

Code for "Making rust as fast as go"

5 mentions on Hacker News by 3 people: 0 stories, 5 comments · first 2020-05-03 · latest 2020-05-15

Mentions per year 5 mentions · busiest year 2020 (5)
20082026
  1. It looks like you got that from this PR: https://github.com/christianscott/levenshtein-distance-bench... That PR does not make the benchmark loads "equivalent." Please look at the diff. That PR adds parallelism to the Rust program. The Go…
    comment by burntsushi · 2020-05-15 · in Five Years of Rust
  2. While Go may be faster somewhere, that post was not a good comparison. See the discussion around it and the patches made by the community and the final results. See the individual benchmarks: https://github.com/christianscott/levenshtein-di…
    comment by manaskarekar · 2020-05-15 · in Five Years of Rust
  3. A few folks have commented that there were logic errors in the Go version. Specifically that len("föö") = 5 should instead have returned len("föö") = 3 I submitted a pull request, https://github.com/christianscott/levenshtein-distance-bench…
    comment by savaki · 2020-05-03 · in Making Rust as Fast as Go
  4. It's cheap, but not _that_ cheap. It shouldn't be as cheap as just iterating over a sequence of 32-bit integers. But yes, I did benchmark this, even after reusing allocations, and I can't tell a difference. The benchmark is fairly noisy. I…
    comment by burntsushi · 2020-05-03 · in Making Rust as Fast as Go
  5. Indeed, it looks like doing the UTF-8 decoding up-front is exacerbating the performance difference in the allocator. I think this is where the GP's first suggestion comes into play. If one were writing this code _and_ cared about…
    comment by burntsushi · 2020-05-03 · in Making Rust as Fast as Go