Skip to content

Conversation

@vstinner
Copy link
Member

@vstinnervstinner commented Jun 24, 2020

Py_InitializeFromConfig() now always creates the empty tuple
singleton as soon as possible.

Optimize PyTuple_New(0): it no longer has to check if the empty tuple
was created or not, it is always creatd.

  • Add tuple_create_empty_tuple_singleton() function.
  • Add tuple_get_empty() function.
  • Remove state parameter of tuple_alloc().

https://bugs.python.org/issue40521

Py_InitializeFromConfig() now always creates the empty tuple singleton as soon as possible. Optimize PyTuple_New(0): it no longer has to check if the empty tuple was created or not, it is always creatd. * Add tuple_create_empty_tuple_singleton() function. * Add tuple_get_empty() function. * Remove state parameter of tuple_alloc().
@vstinnervstinner merged commit 0430dfa into python:masterJun 24, 2020
@vstinnervstinner deleted the tuple_empty branch June 24, 2020 13:21
fasih pushed a commit to fasih/cpython that referenced this pull request Jun 29, 2020
Py_InitializeFromConfig() now always creates the empty tuple singleton as soon as possible. Optimize PyTuple_New(0): it no longer has to check if the empty tuple was created or not, it is always creatd. * Add tuple_create_empty_tuple_singleton() function. * Add tuple_get_empty() function. * Remove state parameter of tuple_alloc().
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@vstinner@the-knights-who-say-ni@bedevere-bot