Primorial numbers: Difference between revisions

Line 1,088:
 
===Binary splitting===
The program above can be made much faster by using a "binary splitting" algorithm that recursively breaks the number range into halves, and then multiplies these smaller numbers together, which will be faster when run under a Java Virtual Machine version 1.8 and later which have a better-than-O(n<SUP>2</SUP>) multiply operation. (Did you know that Frink's author submitted the changes to Java that made <CODE>BigInteger</CODE> much faster?)
 
<lang frink>/** Calculate the primes and set up for the recursive call. */
494

edits