c++ can count primes at compile time if the sieve size is known at compile time #225
werto87
started this conversation in
Show and tell
Replies: 1 comment
-
Yeah, but how do the compiled file sizes compare? You could probably achieve simmilar results if you manually precalculated all primes and listed them in the source, but that's not the point of this Repo |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
c++ constexpr example "https://gist.github.com/werto87/e59883c731ece4926a6a212d920961e9"
I get in 5 seconds:
passes: 98510" with debug build
passes: 307252277" with release build (I think the compiler optimizes the calculation in the loop away)
Beta Was this translation helpful? Give feedback.
All reactions