3 ms·
Simple optimisations like this shave minutes off the runtime of log parsing and data import jobs I run. I do lots of this in Ruby [0], and often write a custom
by douglasfshearer 10y ago
Simple optimisations like this shave minutes off the runtime of log parsing and data import jobs I run.
I do lots of this in Ruby [0], and often write a custom parser when I know that dates or times will be of regular form. As a bonus I get to golf different methods of doing the parsing against each other, using microbenchmarks.
[0] https://gist.github.com/dougal/e972b26cd0293f99b41896e7d89c070e https://gist.github.com/dougal/e972b26cd0293f99b41896e7d89c0...