[ prog / sol / mona ]

prog


LISP Puzzles

127 2020-05-20 20:45

>>123,124

sequence.scm
R(10^8)  5000934571821489            0.121 secs
R(10^9)  500029664631299282          0.421 secs
R(10^10) 50000940106333921296        1.189 secs
R(10^11) 5000029765607020319048      3.671 secs
R(10^12) 500000941936492050650505   13.163 secs
R(10^13) 50000029798618763894670256 54.254 secs

first-order.scm
R(10^8)  5000934571821489            0.268 secs
R(10^9)  500029664631299282          0.609 secs
R(10^10) 50000940106333921296        2.090 secs
R(10^11) 5000029765607020319048      6.838 secs
R(10^12) 500000941936492050650505   21.922 secs
R(10^13) 50000029798618763894670256 69.281 secs

flake.hofs performance remains unchanged, and continues to beat both these implementations except for the R(10^8) case which is now taken by the sequence implementation indicating a low constant. Your old implementation continues to beat mine at every point, and your improved version even more so, on my machine for most values your execution time decreased by about 15%. I improved the memory complexity of my program, and a small constant, which let me get much closer to you, especially when k got large.

157


VIP:

do not edit these