Closed movermeyer closed 1 year ago
I don't see the README updated in this change, will that come in a following PR?
No CHANGELOG entry is needed. Benchmarking scripts are not for end consumers, just for the generation of the performance charts in the README.
I didn't mean the changelog, I meant the readme (the screenshot from the PR description / linked readme.rst file?)
Oh yeah, that'll change will happen when I refresh https://github.com/closeio/ciso8601/pull/135
What are you trying to accomplish?
Fixes #136.
What approach did you choose and why?
At first, I simply add it as another library like any other.
backports.datetime_fromisoformat
is fast, thanks to it using the same lightweight time zone implementation asciso8601
, which means that it is actually faster thandatetime
.This means that it will likely always be 2nd place on the chart. But it also means that as written it will always be the library of comparison:
Which seems a little awkward, since
backports.datetime_fromisoformat
will (by definition) never apply to the latest version of Python.Ideas I considered:
backports.datetime_fromisoformat
from ever being selected for comparison. In this case, it would comparedatetime
instead.backports.datetime_fromisoformat
is clearly the second row.backports.datetime_fromisoformat
anddatetime
have a special relationship, and don't overlap in the versions of Python that they support. They could be merged into a single line in the tablex.y
extends the supported subset of ISO 8601 once again, andbackports.datetime_fromisoformat
backports that version, then they will overlap in the supported versions of Python. 🤷backports.datetime_fromisoformat
is faster, you can see a sudden spike in runtime from 3.10 -> 3.11. That's kinda confusing I guess. 🤷datetime
for my likingbackports.datetime_fromisoformat
at allhardcoded
, where we do the benchmarking for it, but then don't include it in the table.After lots of fussing with it, I realized that I could simply change the comparison summary line.
I changed it so that it will only compare against libraries that support the latest version of Python, and updated the text to match:
What should reviewers focus on?
The impact of these changes
backports.datetime_fromisoformat
is benchmarked and represented in the table.