commit | 629897ed80512a8618e08673c03d8482cbc42eef | [log] [tgz] |
---|---|---|
author | Jonathan Wakely <jwakely@redhat.com> | Wed Nov 16 15:35:23 2022 +0000 |
committer | Jonathan Wakely <jwakely@redhat.com> | Wed Nov 16 20:52:53 2022 +0000 |
tree | 91d3a88f9fe0f259961e01f5ec2190e035f73508 | |
parent | 2f5c071860ba3f8ef67d0b9d8291a73766ce0a44 [diff] |
libstdc++: Improve performance of chrono::utc_clock::now() We can use an array instead of a std::vector, and we can avoid the binary search for the common case of a time point after the most recent leap second. On one system where I tested this, utc_clock::now() now takes about 16ns instead of 31ns. libstdc++-v3/ChangeLog: * include/std/chrono (get_leap_second_info): Optimize.