Hash tables are stored in RAM
Files are stored on your hard drive, so they are speed limited by the speed of your hard drive. Even the fastest drives that I know of, 10000 rpms, are so much slower than the slowest ram, that it's almost not worth bothering with a test.

If you want to see a test, I can do one later on a customized system built to those specifications.