Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update edition, switch to fx hashmap #14

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

PSeitz
Copy link
Contributor

@PSeitz PSeitz commented Jan 28, 2023

  • fix clippy
  • use fx hashmap
HashMap
test bench::bench_build_parametricdfa_damerau_perf_1         ... bench:       4,434 ns/iter (+/- 59)
test bench::bench_build_parametricdfa_damerau_perf_2_profile ... bench:      24,584 ns/iter (+/- 431)
test bench::bench_build_parametricdfa_damerau_perf_3_profile ... bench:     103,651 ns/iter (+/- 1,529)
test bench::bench_build_parametricdfa_perf_1                 ... bench:       2,661 ns/iter (+/- 39)
test bench::bench_build_parametricdfa_perf_2                 ... bench:      79,471 ns/iter (+/- 1,312)
test bench::bench_build_parametricdfa_perf_3                 ... bench:   2,848,942 ns/iter (+/- 19,061)


FxHashMap
test bench::bench_build_parametricdfa_damerau_perf_1         ... bench:       3,034 ns/iter (+/- 108)
test bench::bench_build_parametricdfa_damerau_perf_2_profile ... bench:      29,903 ns/iter (+/- 1,513)
test bench::bench_build_parametricdfa_perf_1                 ... bench:       1,939 ns/iter (+/- 21)
test bench::bench_build_parametricdfa_perf_2                 ... bench:      51,259 ns/iter (+/- 705)
test bench::bench_build_parametricdfa_perf_3                 ... bench:   1,894,284 ns/iter (+/- 25,625)

@Kerollmops
Copy link

What about aHash? I never tried it, but it can probably be interesting to see the performances diffs.

@PSeitz
Copy link
Contributor Author

PSeitz commented Jan 28, 2023

Seems to be slightly slower than fx hash

test bench::bench_build_parametricdfa_damerau_perf_1         ... bench:       3,149 ns/iter (+/- 58)
test bench::bench_build_parametricdfa_damerau_perf_2_profile ... bench:      29,821 ns/iter (+/- 7,170)
test bench::bench_build_parametricdfa_perf_1                 ... bench:       2,020 ns/iter (+/- 60)
test bench::bench_build_parametricdfa_perf_2                 ... bench:      54,819 ns/iter (+/- 2,143)
test bench::bench_build_parametricdfa_perf_3                 ... bench:   1,924,384 ns/iter (+/- 45,537)

@fulmicoton
Copy link
Contributor

@PSeitz I don't think adding this dependency is a good idea. Building the parametric DFA is a one-time thing.

Lucene just ships it in a serialized manner. Even the original paper just describes it without explaining the algorithm to build it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants