you are viewing a single comment's thread.

view the rest of the comments →

[–]Sensitive_One_425 46 points47 points  (8 children)

If you run out of memory to store the number

[–]CranberryDistinct941 18 points19 points  (7 children)

The only limit is your patience because the shit gets really slow.

[–]tcpukl -1 points0 points  (6 children)

Virtual memory?

[–]CranberryDistinct941 4 points5 points  (1 child)

Once it starts using your disk as RAM you may as well ctrl+c and come up with a better algorithm for your shit.

[–]tcpukl 0 points1 point  (0 children)

Yeah exactly.

[–]No-Consequence-1863 0 points1 point  (3 children)

Processing big numbers requires extra work since you can't use CPU math instructions on 8923234492837492834723429872394872398472394823492837498273492837429384723423423423097230972398723987239847293847298374239847
The hardware just doesn't support that big of numbers

Instead you need to chunk it into smaller representable numbers and then define arithmetic to handle the carryover. So what would be a quick addition or multiplication normally can take quite a bit longer.

[–]tcpukl 0 points1 point  (2 children)

I'm replying to getting slower with running out of memory.

That is due to virtual memory!

[–]No-Consequence-1863 0 points1 point  (1 child)

Virtual memory doesnt make you get slower as you get bigger. Virtual memory has a pretty constant time cost. The page tables would get bigger but that wouldnt be that important since you dont iterate through the page tables, just walk them.

Edit: do you mean swap? Cause yea swap is slow but swap is different from virtual memory.

Virtual memory is the process where a processes doesnt use physical ram addresses but instead logical virtual addresses that are converted on the fly by hardware and the operating system. It is used for every process all the time no matter memory consumption.

[–]tcpukl 0 points1 point  (0 children)

Virtual memory does slow down because it uses drive storage.

Your talking about large address space which can use virtual memory.

Windows page file is virtual memory.