huonw / primal

primal puts raw power into prime numbers.
http://docs.rs/primal/
Apache License 2.0
108 stars 17 forks source link

primal-estimate: use optimal estimates across u64 ranges, add better estimates #26

Closed huonw closed 5 years ago

huonw commented 5 years ago

This improves the performance (that is, the distance between the lower and upper bound) of nth_prime and prime_pi.

This is done in two ways:

autohuonw commented 5 years ago

@huonw: no appropriate reviewer found, use r? to override

codecov-io commented 5 years ago

Codecov Report

Merging #26 into master will decrease coverage by 1.03%. The diff coverage is 23.8%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #26      +/-   ##
=========================================
- Coverage   52.24%   51.2%   -1.04%     
=========================================
  Files          16      17       +1     
  Lines        3857    3933      +76     
=========================================
- Hits         2015    2014       -1     
- Misses       1842    1919      +77
Impacted Files Coverage Δ
generators/src/bin/wheel-generator.rs 0% <ø> (ø)
generators/src/bin/estimate-generator.rs 0% <0%> (ø)
primal-estimate/src/lib.rs 96.36% <92.59%> (+0.86%) :arrow_up:
primal-sieve/src/lib.rs 100% <0%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e7fbe98...c98724f. Read the comment docs.

huonw commented 5 years ago

Thanks for catching those nits. I'm unsure about fuzzing tests, as the relationships between the final assertion and the input is rather non-obvious so fuzzers probably won't be as effective as other techniques (e.g. testing exhaustively), but definitely something I'll think about.

bors r=cuviper

bors[bot] commented 5 years ago

Build succeeded