Closed alexalkis closed 1 year ago
prime.zip
With gcc13.1 finds 2 primes upto 1000000 :)
m68k-amigaos-gcc -O3 -mcrt=nix13 -o prime prime.c vamos -v prime 1000000 1 23:16:48.885 main: INFO: done. exit code=0 23:16:48.885 main: INFO: total cycles: 78798 23:16:48.886 main: INFO: vamos is exiting Counted 2 primes up to 2. (Run 1 times)
With gcc6 finds the correct number 78498
vamos -v prime 1000000 1 23:17:31.398 main: INFO: done. exit code=0 23:17:31.398 main: INFO: total cycles: 49823902 23:17:31.398 main: INFO: vamos is exiting Counted 78498 primes up to 1000000. (Run 1 times)
the conversion with atoi failed since an uninitialized ctype table was used. This could also happen with any compiler, depends only of the order of objects in the libnix libs...
atoi
works as expected now. Thanks!
prime.zip
With gcc13.1 finds 2 primes upto 1000000 :)
With gcc6 finds the correct number 78498