First page Back Continue Last page Overview Text


So we've gone over the first two options you can take to improve slow date code.

The third option you can take is to write your own date and datetime classes.

My first attempt at this was called third_base. It was written in late 2008, and was a pure ruby implementation.

It was about 4x faster in creating date objects, and up to 3-12x faster at parsing, and had a lower memory footprint as well.

It also supported pluggable parsers, so you could write your own date parser and plug it into Date.parse.