Talk:Ulam numbers

From Rosetta Code
Revision as of 21:38, 4 December 2020 by rosettacode>Gerard Schildberger (added another talk section about Ulam timings (using REXX).)

timings for the Nth Ulam number

Using the (new and current) REXX program, the times

It   (the REXX program)   is an   O(2)   polynomial

    0.0000005168509818 N^2  -  0.0004990440614098 N  +  0.5707466809128310
           
    Rsquared = 0.9999999315551220


(The above, as measured and timed on Paul Kislanko's 10-core PC.       -- Gerard Schildberger (talk) 21:38, 4 December 2020 (UTC)


timing for the 100,000th Ulam number

The total time for the 100,000th Ulam number using the original REXX program would've taken a little over three years, and that is on Paul Kislanko's PC.     On my old slow PC,   it would've taken about a decade or thereabouts.     -- Gerard Schildberger (talk) 21:22, 4 December 2020 (UTC)

It certainly demonstrates the importance of using a decent algorithm.
I was quite pleased with my first version but it's been trumped twice now by the Phix and XPL0 algorithms! --PureFox (talk) 21:36, 4 December 2020 (UTC)