| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Importing `pickle` is now roughly 25% faster. Importing the `re` module is no longer needed and thus is no more implicitly exposed as `pickle.re`.
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
|
I'll merge this one tomorrow (and will check if removing isidentifier() improves a bit performances). I want to keep the first commit message as it indicates that re is now removed from the global namespace (it should never have been accessed from outside but we never know; maybe someone has been patching that attribute for whatever reason in their test suite). EDIT: no micro-optimization so leaving the numbers as is |
Sorry, something went wrong.
|
As a follow-up, I can also improve the import time of pickletools once I've merged this one (reason is that pickletools imports re and pickle so if I just change pickletools now, without this PR, then we won't see any improvements at all). |
Sorry, something went wrong.
|
@vstinner I plan to merge this one with the following commit message: Importing `pickle` is now roughly 25% faster.
Importing the `re` module is no longer needed and
thus `re` is no more implicitly exposed as `pickle.re`.
and following title: Improve import time of the `pickle` module.
|
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
We can remove the re import which takes quite a long time. Benchmarks were performed on a RELEASE build (no PGO, no LTO). It's a bit hard to have stable numbers with -X importtime, so I'm only using the hyperfine benchmarks.
PR
Main
Since something that is no more present in the global namespace is removed, I've added a NEWS entry and a detailed changelog.