Nick

Results 190 comments of Nick

@mborland : I have begun a performance comparison with [Kim Walish's](https://github.com/kimwalisch/primesieve) prime sieve. Here is the code: ```cpp #include #include #include #include template void prime_sieve(benchmark::State& state) { Z upper =...

> It would be fairly easy to create light wrappers to the current prime_sieve implementation like in the uni-variate statistics library. Nah, if it's not obviously a better way to...

@mborland : Also, make sure to tag your commit messages with `[CI SKIP]` until we are about to merge.

I just went through _The Joy of Factoring_ to refresh my memory on how these sieves work. I implemented algorithm 8.2 of that book, which the author claims runs in...

Just ran this benchmark under `perf`: ![kimwalish](https://user-images.githubusercontent.com/5459618/87232923-db4a2d80-c390-11ea-9a54-ba7d85827d88.png) So Kim Walish's prime generator does indeed compute logarithms and fill up a table of primes; quite a bit of time in `malloc`;...

@mborland : Really cool. BTW, if you're going to do threading, write a parallel execution policy; we need the ability to not use threads. [Here's](https://github.com/boostorg/math/pull/248/files) an example I started (but...

> Performance ticked down a bit to 3.07N/0.23N because I realized I was relying on the prime table to be statically linked. I do recommend that the prime table not...

@mborland : All the new features I'm adding require C++17; also the `univariate_statistics.hpp` file requires C++-17 and uses `if constexpr` to great effect, IMO. My view is that gcc, clang...

> Note that the internal use case for that table really does require fast table lookup of primes. Ok, no deprecation message, but there is hope that this will be...

@mborland : What is the use case for `boost::math::prime_range(100, 1000, std::back_inserter(primes));`? I understand wanting all the primes `< x`, but I've never seen anyone need primes in a range. >...