Indeed! It was a while ago but Im quite proud of the fast timestamp functions I made for Java after the standard library timestamp performance turned out to be critical to some data pipelines I was working on.
The early versions of the code did cache the last parsed date etc but as the parser got quicker this became diminishing returns.
The fastest way I found for the calendar month numbers etc was to use a precomputed table etc.