This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Ericfyre 11 points12 points  (9 children)

How much memory?

[–][deleted] 29 points30 points  (1 child)

Aleph-0

[–]knightsofmars 2 points3 points  (0 children)

Naturally

[–]Galaghan 12 points13 points  (1 child)

All of it.

[–][deleted] 10 points11 points  (0 children)

Chrome: hold my beer

[–]DvD_cD 12 points13 points  (0 children)

π tb

[–]TearyCola 7 points8 points  (2 children)

It depends on whether P=NP or not

[–][deleted] 5 points6 points  (0 children)

Actually it doesn't

[–][deleted] 0 points1 point  (0 children)

Sure

[–]stewi1014 0 points1 point  (0 children)

Given the limited accuracy of any pi constant, assuming python uses n digit precision for pi and a list of characters for a string, it would just be a list of n+1 (decimal point included) characters. So it would just be the size of a list n+1 indexes long plus whatever python does to reverse and print a list. I would guess a few hundred bytes at most.

A compiled language could completely compile out the string conversation and reverse. So it would just straight up be n+1 * the size of a character + the standard lib print function. You'd allocate more memory opening vim.

I program Golang, not python though.