Ormiston triples: Difference between revisions
m
→{{header|Wren}}: Minor changes to first version including using the correct 'cacheSize' parameter for my machine though performance unaffected.
(→{{header|Wren}}: Like Phix, added a faster version using 'primesieve'.) |
m (→{{header|Wren}}: Minor changes to first version including using the correct 'cacheSize' parameter for my machine though performance unaffected.) |
||
Line 1,822:
var limit = 1e10
var primes = Int.segmentedSieve(limit,
var orm25 = []
var j =
var count = 0
var counts = []
Line 1,852:
Fmt.tprint("$,10d ", orm25, 5)
System.print()
j =
for (i in 0...counts.count) {
Fmt.print("$,d Ormiston triples before $,d", counts[i], j)
Line 1,875:
===Faster version===
{{libheader|wren-psieve}}
This uses our bindings to the C++ library
It's also far quicker - 4.4 seconds to search up to 1 billion and 43.4 seconds to search up to 10 billion.
|