You probably need to specify a path while importing. For example, running from 
./bin "prime_bench.nim" file:
    
    
    from ../src/lib/lib_euler_primes import primeSieve
    from os import commandLineParams
    from strutils import parseUInt
    
    let arguments = commandLineParams()
    
    echo arguments[0].parseUInt.primeSieve.len
    
    
    
    $ time ./bin/prime_bench 1_000_000_000
    50847534
    
    real    0m6.478s
    user    0m6.069s
    sys     0m0.392s
    
    
    
    $ time ./bin/prime_bench 10_000_000_000
    455052511
    
    real    1m33.301s
    user    1m11.694s
    sys     0m14.762s
    

Compilation was done with -d:release. I tried with march=native but it didn't 
seem to help.

This is on a MacBook Pro 13 2015, so 
[i5-5257U](https://www.notebookcheck.net/Intel-Core-i5-5257U-Notebook-Processor.127680.0.html).
 You can compare it to others on 
[Notebookcheck](https://www.notebookcheck.net/Mobile-Processors-Benchmark-List.2436.0.html).
 

Reply via email to