

They used to make these, possibly still do! I can’t find any good current references, but based off vague memories of reading about one in maximumPC in the mid 2000s, I found this thread which confirms they did at one point exist: https://community.spiceworks.com/t/ram-disk-enclosure/213360
If you’re really interested in the idea, you could ballpark whether it’s plausibly worthwhile by creating an actual ramdisk partition from your regular system memory and pointing swap at it, then comparing behavior to if you point swap back at the actual disk drive (don’t free the ramdisk! otherwise it won’t be apples to apples in terms of available system memory).
If you’re seeing good performance there, it’s possible something like this would work (but even in this case, the latency and bandwidth are going to be way different, as the hardware ram-drive would be going over the SATA/PCI bus, rather than directly to a different segment of main memory like the ramdisk does).