{"shas":[["ea20e5778b03b7c5c543768603dd2d1b7d2c2761","d99b4da1fb5010cac02fcc88ab0a48facbce3ac8@exolucere.ca","Performance improvement in GPX parser.\n\nJust for fun, the original behavior from when I originally wrote the GPX parser forever ago:\n$ python -mtimeit -s 'import time' 'time.strptime(\"2010-10-16T20:09:13Z\", \"%Y-%m-%dT%H:%M:%SZ\")'\n10000 loops, best of 3: 20.5 usec per loop\n\nBehavior before this commit:\n$ python -mtimeit -s 'import re,calendar;d = re.compile(r\"[:TZ-]\")' 'calendar.timegm(map(int, d.split(\"2010-10-16T20:09:13Z\")[0:6]))'\n100000 loops, best of 3: 7.72 usec per loop\n\nBehavior introduced by this commit:\n$ python -mtimeit -s 'import re;from calendar import timegm;d = re.compile(r\"[:TZ-]\");sp=d.split' 'timegm(map(int, sp(\"2010-10-16T20:09:13Z\")[0:6]))'\n100000 loops, best of 3: 7.53 usec per loop\n\nSo it is only slightly faster, but this is a time-critical inner-loop, so it's warranted.","Robert Bruce Park"]],"repo":"robru/GottenGeography","actor":"robru","ref":"refs/heads/jhbuild","size":1,"head":"ea20e5778b03b7c5c543768603dd2d1b7d2c2761","actor_gravatar":"16fe3b04a50e310228f0d960720c2bf1","push_id":23275947}