Calculating 10000 digits of Pi - Printable Version +- NaaLaa (https://www.naalaa.com/forum) +-- Forum: NaaLaa (https://www.naalaa.com/forum/forum-1.html) +--- Forum: NaaLaa 7 Code (https://www.naalaa.com/forum/forum-4.html) +--- Thread: Calculating 10000 digits of Pi (/thread-71.html) |
Calculating 10000 digits of Pi - Tomaaz - 02-07-2024 OK. I know this is not the kind of program NaaLaa has been created for, but I use it to test the speed of any language I try. Well, NaaLaa is doing a pretty good job here and runing this example as fast as other fast interpreters. Code: n = 35001 EDIT: On my machine it takes about 1 min. to complete the task and this is the speed I'm expecting from an interpreted language. Python is slightly faster, while Perl being 25% faster than Python. Tcl is 10+ times slower than NaaLaa. It's worth to remember that NaaLaa runs through Wine, while Python, Perl and Tcl run natively. RE: Calculating 10000 digits of Pi - johnno56 - 02-07-2024 Varies a little on my machine... averages between 15 and 21 seconds. Preventing the "text" being displayed made little to no difference in the running times... but still cool... RE: Calculating 10000 digits of Pi - Tomaaz - 02-08-2024 You definitely have a more powerful hardware. Preventing text from being displayed will not help here as the inner loop takes the most time in this example. RE: Calculating 10000 digits of Pi - 1micha.elok - 02-12-2024 I added some lines at the bottom of the codes to measure it. Code: pln "It took "+clock()/1000+" seconds" On my computer, it took 30 seconds. ... My machine is slower than Johnno's |