Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
That's worse than the kind of difference I was expecting; but still, it's a micro-optimization benchmark which depends on being able to have fine control over not overflowing the CPU caches, and enough people willing to spend a lot of effort tuning. Or cheating; this Lisp one seems to calculate the Primes as a reader-macro-expansion, before compile time, then runtime is ridiculously fast.
$ swipl Welcome to SWI-Prolog (threaded, 64 bits, version 8.5.10) SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software. Please run ?- license. for legal details. For online help and background, visit https://www.swi-prolog.org For built-in help, use ?- help(Topic). or ?- apropos(Word). ?- [fm2gp_primes]. true. ?- time( setup_call_cleanup(open('prolog-primes.txt', write, Out), with_output_to(Out, primes(500_000)), close(Out)) ). % 8,766,852 inferences, 1.055 CPU in 1.198 seconds (88% CPU, 8311018 Lips) Out = (0x600000648100).
Related posts
- Primes – A Software Drag Race
- Is this an efficient way to check if a number is prime number?
- I need some help on a project!!!
- Top 5 Fastest Programming Languages: Rust, C++, Swift, Java, and 90 more compared!
- Since when did Python haters spread out everywhere? Maybe DNF5 would be faster because of ditched it, maybe.