Virtual memory is different from swap memory.
Swap memory is used when you run out of physical memory, so the memory is extended to your storage.
Virtual memory is an abstraction that lies between programs using memory and the physical memory in the device. It can be something like compression and memory-mapped files, like mentioned.
And yes, some swap is still useful, up to something like 4G for larger systems.
And if you want to hibernate to disk, you may need as much swap as your physical memory. But maybe that’s changed. I haven’t done that in years.
I get it, sometimes you just do something for the challenge.
It’s really great what you can accomplish when you know a little more than the bare minimum of the tools at your disposal (^^,)
And I had the same experience after learning a bit more about awk for the fist time, hahaha.