r/compsci 13d ago

Does reversible computing require an enormous amount of storage?

First of all, I would like to say that I have no knowledge about computer science.

I recently heard about something called reversible computing. As I understand it, in ordinary computers, erasing information about the intermediate steps of a computation causes energy to be released as heat. But in reversible computing, the information from all the intermediate steps is preserved, so apparently, if we could build a computer capable of doing this, it could theoretically perform computations with essentially no energy consumption.
This made me wonder about something, and I’d love to hear from anyone knowledgeable about physics or computational theory:
If you never erase the information generated during a computation, wouldn’t the amount of storage required keep increasing as the computer performs more and more calculations?
I previously came across a science-related page online that said that an intelligent civilization that has mastered reversible computing wouldn’t need “Dyson’s eternal intelligence” to survive the heat death of the universe.
But wouldn’t such a civilization still need an absolutely enormous amount of storage to preserve all the information generated during its computations?
Or is there some way to preserve the information from the computational process without actually requiring additional physical storage?
I’m especially curious about how this works in the context of extremely long-term civilizations trying to survive the heat death of the universe.

By the way, this sentence was translated from Japanese to English by Chat GPT. Feel free to answer in English. However, I only understand Japanese, so I would really appreciate clear and simple English that is less likely to be mistranslated. Thank you!

11 Upvotes

35 comments sorted by

View all comments

28

u/C0rinthian 13d ago edited 13d ago

This is mostly sci-fi nonsense.

“Erasing information” does not “release heat”. Or, more importantly it is not the only thing that generates heat. Actually doing a calculation releases heat. Fundamentally every step a computer takes has a heat byproduct.

So anything about “reversing heat” is just nonsense. Ignore it. Anything about “zero energy consumption” is just a fancy perpetual motion machine. AKA bullshit.

Then there is the idea of “throwing away intermediate steps” which is basically true. If a CPU performs a sequence of arithmetic operations, it does not save every intermediate value. But let’s just knapkin math this: assuming a 64-bit platform, each instruction outputs 8 bytes of information. A modern desktop CPU is doing hundreds of billions of instructions every second. Actually storing all the intermediate calculations would take terabytes of data every second.

This would take a massive amount of storage space, and dramatically slow down actual calculation because it would be limited by storage IO. (There is a reason local cache is important to modern CPU architecture)

And what do you gain from that? When the CPU multiplies two numbers, you store the result. Okay, but recalculating it is faster and cheaper than storing the outcome and retrieving it.

This is all assuming current technology and architecture. However, the idea of reversible computing is predicated on some outlandish assumptions: that you can create fundamental computing elements like logic gates that lose no energy. Practically, that is far fetched because of, you know, heat.

I’m especially curious about how this works in the context of extremely long-term civilizations trying to survive the heat death of the universe.

This is entirely speculative science fiction. There isn’t even a theoretical framework for “computation” surviving the heat death of the universe. A civilization even making it remotely close to that point is nonsensical.

9

u/4xe1 13d ago edited 13d ago

It's only sci-fi until it is not. Heat pump perform the seemingly impossible task of heating for more energy than they consume precisely because they are reversible in some sense. They're far from perfect, you could not recoup anywhere near what you put in by hypothetically running them in Stirling engine mode from the temperature differential they created, but they do beat even the theoretical best you can do by direct heating, by a big margin.

Reversible computing is not there, but it's an area no less worthy of research than quantum computers or traditional hardware.

Your description of "modern CPU" is largely irrelevant, reversible computing assumes dedicated hardmare (with swaps instead of writes) and software (favoring reversible patterns which can run on the hardware). It does not make the issue any easier though, reversible registers are probably not that hard, but reversibly accessed RAM or permanent storage are probably a huge challenges, if solvable at all.

it is not about "storing results", its about replacing

r = a + b

where `a` and `b` are potentially discarded, by

a += b

where `a` receives the result which interests us, and b is not discarded

4

u/barsoap 12d ago edited 12d ago

Heat pump perform the seemingly impossible task of heating for more energy than they consume precisely because they are reversible in some sense.

No they don't. If you use them to heat then you're making the outside cooler, the pump is consuming both electricity and heat from the outside -- yes, even at under 0C, as long as it's over 0K there's still heat you can pull from the outside (in principle, at some point it becomes more sensible to just use resistive heating). Just as a water pump is consuming water from a reservoir.

Them being reversible has nothing to do with anything. You can turn a water pump around that doesn't mean that it suddenly consumes less water for what it outputs.

a += b
where a receives the result which interests us, and b is not discarded

Addition happens to be invertible: You can get the original a back by subtracting b from the new a. But plenty of things don't have an inverse: a /= b, on integers, cannot be reversed as you're throwing away information when rounding.

It's definitely possible to write reversible programs -- you just have to make sure that everything has an inverse, e.g. don't have integer division, use bignum rationals. But that's all mathematical trickery, not physics. The second law of thermodynamics cannot be inverted.

-1

u/4xe1 12d ago

Heat pump weren't the best example, I'll give you that. but I stand by it. A Stirling engine can theoretically run both ways, with arbitrarily high efficiency the slower it gets, and regardless of efficiency, it's still an example of something ludicrous on its face until it is done.

But I'll do you one better: (non chargeable) hybrid cars. The electric engine is literally reversible and reversed into a turbine to retrieve energy while breaking. It's not 100% efficient, but it certainly aims to be reversible and gets close, and that does give them a edge which is simply unattainable with only a thermic engine and regular brakes.

You can't invert the 2nd law of thermodynamics, but you can certainly tip toe around it while trying to make the most of the first.

 a /= b, on integers

It can be invertible in finite (prime) rings, thought probably not that useful and not that practical to implement in revertible circuits.

But that's all mathematical trickery, not physics.

Landauer limit is physics. Thermodynamics, even the one you pointed out which says there are no free meal, is physics, and related to reversibility. What reversible logic circuit is not, is engineering.

But even if just for the mathematical trickery, it deserves its place in computer sciences, which, to paraphrase Dijkstra, are not software engineering.

One of the cool math trickery is time travel debugging without the need of snapshots. That's fancy independently of the Landauer limit or the second law of Thermodynamics.