From my desk:
local one - 0.029 seconds
1.1.1.1 - 0.035 seconds
8.8.8.8 - 0.120 seconds
Normally it should be, but Firefox's behavior is very sensitive to DNS response speed. Sounds not intuitive, but I think they're not using glibc's caching, or doing something by themselves.So I use 8.8.8.8 and 9.9.9.9 in parallel through dnsmasq. Whoever responds the first wins. If you're not stuck in the middle of nowhere, you're probably better off with the latter as it's somewhat more trustworthy than Google.
Instead I increase the directory size to 4K and be done with it.
It makes sense here because of bad peering: 8.8.8.8 may be responding in 90 ms right now, but could very well start taking 200 ms a few hours later. So I use multiple services as a backup of sorts.
All of the networks I have have a DNS server around that speed now, and Firefox works visibly faster on all of them. Possibly an intersection between human perception and hardware capabilities of my systems at hand.
CTRL+SHIFT+R always disables cache for that reload, too.
And by random I mean downloaded from a website of corporation with less than $100B valuation :)
I investigated and found that Firefox's in-memory DNS cache can be manually cleared by clicking a button in about:networking. To be fair Chrome also has a similar cache and method for clearing it. See: https://www.makeuseof.com/chrome-edge-firefox-safari-opera-b...
Or as a slightly more thorough approach, you can use something like namebench or dnsbench:
Another through method will be hyperfine[0], yet I wanted to provide a method which requires no installation and can be done in a whim, without jumps and hoops, with the tools already at hand.