macOS works under the premise that unused RAM is wasted. To a great extend it will use the RAM it has available for something. That includes what it calls file caching, where it tries to predict what file blocks you might access later or has recently accessed but aren’t actively using anymore and keeps it in RAM/doesn’t evict it. This reduces disk reads and is of course faster than a disk read. A lot of people interpret this incorrectly however. I see a lot of cases where people with very low memory pressure in the green see a lot of their RAM as “used” and think they *need* more RAM when in reality it’s just the caching using it, and not active app or wired memory.
As of whether it might speed anything up for you, it’s hard to say definitively. I would think probably not noticeably if your memory pressure is in the green. While it might cache more things I hardly think you’d really notice it honestly.
If however you would like the whole VM to be in RAM instead of whatever macOS may decide to cache, you can set up a tmpfs ram disk and manually copy your VM to that. Just remember to flush it to disk after you’re done since RAM is volatile. And preferably be connected to a UPS so you don’t lose data before you flush it. The advantage there would then be though that you’d also never have to flush to disk before you’re ready. That’s a data risk if somehow power is lost or a crash occurs before you flush, but it’s a major speed boost over having to flush dirty pages to disk on every write, even if we assume a coalescing write model