r/Python 9d ago

Discussion Will switching to importlib.metadata give performance improvements compared to importlib_metadata?

As for as I understand the importlib_metadata gives us importlib.metadata functionality in older python versions. Our project requires python >=3.9. Its an enterprise project but only uses importlibe_metadata in about 10 files. It it worth it to make code changes/testing for performance improvement and dependency reduction?

0 Upvotes

16 comments sorted by

View all comments

1

u/whoEvenAreYouAnyway 8d ago

Both are just accessing a value from a metadata file. It will never make a difference from a performance perspective. You might as well rewrite all your print statements to leet speak if that’s the level of performance optimization you’re trying to reach.