Twin primes: Difference between revisions
m
→{{header|Wren}}: Minor tidy
Thundergnat (talk | contribs) m (→{{header|Raku}}: Added a runtime on my (fairly beefy) system) |
m (→{{header|Wren}}: Minor tidy) |
||
(One intermediate revision by one other user not shown) | |||
Line 1,372:
The time complexity here is all about building a table of primes. It turns out that using the builtin get_prime() is actually faster
than using an explicit sieve (as per Delphi/Go/Wren) due to retaining all the intermediate 0s, not that I particularly expect this to win any performance trophies.
<!--(phixonline)-->
<syntaxhighlight lang="phix">
with javascript_semantics
Line 1,954 ⟶ 1,955:
{{libheader|Wren-math}}
{{libheader|Wren-fmt}}
<syntaxhighlight lang="
import "./fmt" for Fmt
var c = Int.primeSieve(1e8-1, false)
|