News for hackers. Stuff that matters.
Re:A Million Digits of Pi in 9 Lines of JavaScript by ajennings on Thursday September 12, 2019 @05:14PM (#20956532)
It should take 415kB to store a million digit number, and the algorithm only needs to keep two of them. So, 1MB total to calculate a million digits of pi. I wonder if there are a lot of temporary allocations that build up until they get garbage collected.
Re:A Million Digits of Pi in 9 Lines of JavaScript by sp332 on Thursday September 12, 2019 @05:51PM (#20956858)
Not sure what it is exactly, but forcing a garbage collection (using the "minimize memory usage" button in about:memory) doesn't make any difference.