url: reduce `pathToFileURL` cpp calls
My local benchmarks show the following changes:
confidence improvement accuracy (*) (**) (***)
url/whatwg-url-to-and-from-path.js n=1000000 method='fileURLToPath' input='file:///dev/null?key=param&bool' *** 12.59 % ±1.21% ±1.62% ±2.12%
url/whatwg-url-to-and-from-path.js n=1000000 method='fileURLToPath' input='file:///dev/null?key=param&bool#hash' *** 9.72 % ±0.70% ±0.94% ±1.22%
url/whatwg-url-to-and-from-path.js n=1000000 method='fileURLToPath' input='file:///dev/null' *** 18.85 % ±1.02% ±1.36% ±1.78%
url/whatwg-url-to-and-from-path.js n=1000000 method='pathToFileURL' input='file:///dev/null?key=param&bool' *** 11.93 % ±0.78% ±1.04% ±1.35%
url/whatwg-url-to-and-from-path.js n=1000000 method='pathToFileURL' input='file:///dev/null?key=param&bool#hash' *** 10.31 % ±0.67% ±0.89% ±1.16%
url/whatwg-url-to-and-from-path.js n=1000000 method='pathToFileURL' input='file:///dev/null' *** 18.86 % ±1.25% ±1.67% ±2.18%
Be aware that when doing many comparisons the risk of a false-positive result increases.
In this case, there are 6 comparisons, you can thus expect the following amount of false-positive results:
0.30 false positives, when considering a 5% risk acceptance (*, **, ***),
0.06 false positives, when considering a 1% risk acceptance (**, ***),
0.01 false positives, when considering a 0.1% risk acceptance (***)