[issue24416] Have date.isocalendar() return a structseq instance

Paul Ganssle report at bugs.python.org
Sun Sep 8 14:16:47 EDT 2019


Paul Ganssle <p.ganssle at gmail.com> added the comment:

I have compiled both versions with optimizations on, looks like the gap gets a bit smaller (percentage-wise) after that:

       benchmark                    |  master (ns)  |  PR 15633 (ns)  |  Δ (%)
------------------------------------+---------------+-----------------+----------
call only (datetime)                |     73 (±3)   |     92.3 (±7)   |   26
constructor + call (datetime)       |    228 (±9)   |     260 (±16)   |   14
timedelta + call (datetime)         |    108 (±5)   |     128 (±9)    |   18

If this were something fundamental like a performance regression in building a tuple or constructing a dictionary or something I'd be concerned, but this just reinforces my feeling that, on balance, this is worth it, and that we are probably not going to need a "fast path" version of this.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue24416>
_______________________________________


More information about the Python-bugs-list mailing list