Created
November 3, 2021 01:05
-
-
Save sergiolucero/c342a316648e9891182561fc7ff779b0 to your computer and use it in GitHub Desktop.
first 20 million p-sums
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
t0=time.time() | |
psum=[(p,sum(pow(ix,-p) for ix in range(1,1000000))) for p in range(2,20)] | |
print(psum, time.time()-t0) # on my HP (2-20)x1M takes 4.5s |
Author
sergiolucero
commented
Nov 3, 2021
Time is half on the Macbook Pro (bench with hardware shot).
import platform
platform.processor()
'Intel64 Family 6 Model 158 Stepping 10, GenuineIntel'
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment