[tz] Direct implementation of mktime_z

Paul Eggert eggert at cs.ucla.edu
Fri Sep 23 18:51:55 UTC 2022


On 9/23/22 04:19, Ted Phelps via tz wrote:

>      https://github.com/tphelps/tz64/
> 
> The performance improvement is substantial; on my laptop (Intel
> i7-8550U, 4GHz) it takes about 35ns to convert a struct tm to a time_t;
> whereas mktime_z takes about 3,300ns.
> 
> Which, finally, brings me to my question: is there any interest in
> reworking tzcode's mktime to use a more efficient algorithm?

Sure, if it's easy. Would you be willing to contribute code under the 
current license for mktime? It's public domain. We could add your name 
to the credits, if that would help.

Although I don't want tzcode to assume 64-bit signed time_t, I assume it 
wouldn't be hard to relax that assumption.


More information about the tz mailing list