Skip to content

Releases: TheDMSGroup/govaluate

0.1.0

30 Aug 19:11
a2bbf5c
Compare
Choose a tag to compare
Avoid creating new time on invalid time token

The parser attempts to parse each string token as time. In case of a non-time token, a time.Now() instance is created, which is immediately discarded. In a tight loop this unnecessary allocation can drastically slow down template parsing.

This PR simply returns time's empty value, which does not cause an allocation.