PlummersSoftwareLLC / Primes

Prime Number Projects in C#/C++/Python
https://plummerssoftwarellc.github.io/PrimeView/
2.43k stars 574 forks source link

Thoughts on Prime Number Generation Challenge and a Possible Spin-Off #931

Closed JamesLear92 closed 1 year ago

JamesLear92 commented 1 year ago

Hello

Really enjoying the prime number generation challenge.

Most newcomers might be creating a usable list or array of primes when comparing their results to these benchmarks. It's a more intuitive approach since anyone writing a function to produce prime numbers wants to see the numbers it produced, but this is a disadvantage in this challenge as these conversions aren't factored into the benchmark.

Currently, we're generating a bitarray to show primes as 1s and 0s, or true and false. To make it actually usable, we convert it to a list or array of primes. In the current rules, we're just creating a count to verify the results after the benchmark, but this just highlights that a bitarray isn't really what we want from the code.

So, here's an idea: A separate challenge that requires usable data generation - A list or array of primes. This way, we can bench the entire process and keep the benchmarks slightly more real world relevant.

Newcomers are going to start off with a naive implementation that returns actual primes, it's a tiny bit of a shame they can't begin their optimisation journey from there, rather than the unfamiliar deep end.

Maybe it's worth a shot?

Cheers,

James

rbergen commented 1 year ago

I'm converting this to an Ideas discussion.