[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: use of TZ by mktime()/strftime()
From: |
Neil R. Ormos |
Subject: |
Re: use of TZ by mktime()/strftime() |
Date: |
Wed, 10 Aug 2022 15:13:21 -0500 (CDT) |
Ed Morton wrote:
> Neil R. Ormos wrote:
>> I make an external call to date(1), instead of
>> mktime(), when I can't be sure that the input
>> is well-behaved. I'm sure it's more expensive
>> then mktime(), but the overhead seems a
>> tolerable price to pay [...]
> Thanks Neil, yeah I've done the same at times
> for small input files but it is an order of
> magnitude slower than using builtin time
> functions so if/when I don't NEED to do that
> then I avoid it. [...]
To put some real-world numbers to this...
Benchmarking my conversion function on a pair of old, slow systems, I get ~600
and ~900 calls per second.
I can see how the external call approach would be unsuitable for operating on
larger input files.
- use of TZ by mktime()/strftime(), Ed Morton, 2022/08/09
- Re: use of TZ by mktime()/strftime(), Ed Morton, 2022/08/09
- Re: use of TZ by mktime()/strftime(), arnold, 2022/08/10
- Re: use of TZ by mktime()/strftime(), Eli Zaretskii, 2022/08/10
- Re: use of TZ by mktime()/strftime(), Ed Morton, 2022/08/10
- Re: use of TZ by mktime()/strftime(), Neil R. Ormos, 2022/08/10
- Re: use of TZ by mktime()/strftime(), Ed Morton, 2022/08/10
- Re: use of TZ by mktime()/strftime(),
Neil R. Ormos <=
- Re: use of TZ by mktime()/strftime(), Ed Morton, 2022/08/10
- Re: use of TZ by mktime()/strftime(), Neil R. Ormos, 2022/08/10
Re: use of TZ by mktime()/strftime(), Andrew J. Schorr, 2022/08/09