zlacker

[return to "For algorithms, a little memory outweighs a lot of time"]
1. LPisGo+Y9[view] [source] 2025-05-21 20:27:55
>>makira+(OP)
I think it is very intuitive that more space beats the pants off of more time.

In time O(n) you can use O(n) cells on a tape, but there are O(2^n) possible configurations of symbols on a tape of length n (for an alphabet with 2 symbols), so you can do so much more with n space than with n time.

◧◩
2. qbane+1c[view] [source] 2025-05-21 20:39:18
>>LPisGo+Y9
But you also spend time on updating cells, so it is not that intuitive.
◧◩◪
3. LPisGo+Ac[view] [source] 2025-05-21 20:43:00
>>qbane+1c
I’m not sure what you mean here. If you’re in the realm of “more space” than you’re not thinking of the time it takes.

More precisely, I think it is intuitive that the class of problems that can be solved in any time given O(n) space is far larger than the class of problems that can be solved in any space given O(n) time.

◧◩◪◨
4. Almond+Af[view] [source] 2025-05-21 21:05:39
>>LPisGo+Ac
If your program runs in O(n) time, it cannot use more than O(n) memory (upper bound on memory usage.

If your program uses O(n) memory, it must run at least in O(n) time (lower bound on time).

◧◩◪◨⬒
5. within+pN1[view] [source] 2025-05-22 14:12:46
>>Almond+Af
This is pretty easy to refute:

> If your program runs in O(n) time, it cannot use more than O(n) memory (upper bound on memory usage.[sic]

This is clearly refuted by all software running today. Programs (especially games) clearly use more memory than there are instructions in the program.

> If your program uses O(n) memory, it must run at least in O(n) time (lower bound on time).

Memory bombs use an incredible amount of memory and do it incredibly quickly.

◧◩◪◨⬒⬓
6. Almond+1U3[view] [source] 2025-05-23 06:13:23
>>within+pN1
>Programs (especially games) clearly use more memory than there are instructions in the program.

How can you access a piece of memory without issuing an instruction to the CPU? Also, "clearly" is not an argument.

>Memory bombs use an incredible amount of memory and do it incredibly quickly.

How can you access a piece of memory without issuing an instruction to the CPU? Also "incredibly quickly" is not an argument. Also also, O(n) is incredibly quick.

◧◩◪◨⬒⬓⬔
7. within+i25[view] [source] 2025-05-23 17:26:33
>>Almond+1U3
> Also, "clearly" is not an argument.

As in your assertion is literally self-evidently false. It is on you to provide a burden of proof here; especially since there are instructions that can load more than a single bit of memory.

> How can you access a piece of memory without issuing an instruction to the CPU?

Let me rather ask you this: where do the instructions exist that are running? That is right: in memory. However, just because instructions exist in memory doesn’t mean they’re accessed. There is not a relationship between the number of instructions and the amount of memory accessed/used.

[go to top]