improve performance of date <-> int64  conversion