On Tue, Jul 16, 2019 at 09:17:07PM -0700, Nam Nguyen wrote:
Generally speaking, though, do you see 1 millisecond spent on parsing a URL deal breaker?
That seems pretty slow for today's PCs, and quite a regression compared to the existing urllib.parse.urlparse function. On my old PC, I can parse a million URLs in 11 seconds, call it ten microseconds each: py> from timeit import Timer py> setup = "from urllib.parse import urlparse; s = 'https://www.google.com.au/foo/bar/web.html?a=b&c=d'" py> t = Timer("urlparse(s)", setup=setup) py> t.repeat() [11.07607395760715, 11.11838942207396, 11.057457006536424] If you run the same timeit benchmark, you'll get a rough idea of the relative speed of your computer compared to mine; that will allow you to extrapolate your "1 millisecond" per URL onto my PC. -- Steven