On Mar 18, 12:00 pm, Chuck Remes <[email protected]> wrote: > On Mar 18, 2011, at 1:10 PM, Jeremy Evans wrote: > > > On Mar 17, 2:11 am, funny_falcon <[email protected]> wrote: > >> It is well known that date parsing is slow. > > > Personally, I don't think custom parsers like this make sense for a > > database library, so unless people here have strong feelings that this > > should go in, I'm going to recommend just overriding Time.parse. I > > think if you took the home_run parser with funny_falcon's patch and > > changed it so that it created Time values directly (currently it > > creates an intermediate hash, as that is how the stdlib works), it > > would probably be even faster than this patch. > > I am in need of a faster Time.parse but not all of my projects use Sequel. > What is the best replacement gem (or monkey-patch) for Time.parse these days?
It's hard to say without knowing exactly what formats you want to parse. home_run is faster than the stdlib in all cases (I think), and significantly faster if you are using a format its ragel parser supports. However, currently there's no way of using just the parser without the rest of home_run, though. It's MIT licensed, so feel free to use/extend it as you see fit. Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en.
