speeding up + ctfe question
sclytrack
sclytrack at iq87.fr
Sun May 27 06:46:52 PDT 2012
On 05/27/2012 02:10 PM, maarten van damme wrote:
> thank you :)
>
> I wrote a sieve of aristotle because atkin's sieve needed waay to many
> optimizations to beat aristotle's sieve by even a little bit so I
> wanted to see if aristotle's was good enough.
>
> I ran in two problems. It was extremely fast when sieving a byte array
> of 1 million entries (without optimizations at all) but when trying
> with 10_000_000 entries the program crashes before it even starts to
> execute (main isn't reached).
>
> Then I decided to benchmark the code and dmd fails to compile with
> "Internal error: ..\ztc\cgcs.s 354".
>
> I assume the first problem has to do with memory limits and that the
> second is a little dmd bug. code is at
> http://dl.dropbox.com/u/15024434/d/aristotleSieve.d
Yeah I get the same errors. And I'm not acquainted with the benchmark code.
--
http://dlang.org/concepts.html
isprime there says that 2 is not a prime.
enum result = isprime(2);
compile time enum "result" says false.
--
http://erdani.com/d/web/phobos-prerelease/std_benchmark.html
(the future)
--
Er is zon buiten. Zonnige zondag namiddag met priemgetallen in de plaats
van buiten zitten. Tss tss. :-)
More information about the Digitalmars-d-learn
mailing list