It seems like it performs quite a bit worse than the library, which creates the full object.
In [82]: %timeit ciso8601.parse_datetime('2014-01-09T21:48:00.921000')
1000000 loops, best of 3: 368 ns per loop
In [83]: %timeit iso_regex.match('2014-01-09T21:48:00.921000')
100000 loops, best of 3: 9.72 µs per loop
In the interest of intellectual pursuit, is there anything that can be done to the regex to speed it up?
Comments
I'm not much of a regex wizard, but I tried to add all the features listed other than parsing the result and creating the datetime object.
It seems like it performs quite a bit worse than the library, which creates the full object. In the interest of intellectual pursuit, is there anything that can be done to the regex to speed it up?