gh-124503: simplified ast.literal_eval#137010
Conversation
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Is there anything that needs to be done to merge this PR? |
|
I think that it it is worth to add a small NEWS entry. |
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
The implementation does not create anymore local functions which reduces the overhead for small inputs. Some other calls are inlined into a single `_convert_literal` function. We have a gain of 10-20% for small inputs and only 1-2% for bigger inputs.
Done |
|
Thank you for your contribution, @kmagusiak. |
|
|
Seems like an unrelated issue. Should I do anything? |
|
Ignore, it is unrelated. |
…H-137010) The implementation does not create anymore local functions which reduces the overhead for small inputs. Some other calls are inlined into a single `_convert_literal` function. We have a gain of 10-20% for small inputs and only 1-2% for bigger inputs.
The implementation does not create anymore local functions which reduces the overhead for small inputs. Some other calls are inlined into a single
_convert_literalfunction.We have a gain of 10-20% for small inputs and only 1-2% for bigger inputs.
ast.literal_evalImplementation #124503