python / python/cpython

Add tier 2 partial evaluation pass.

Aberta
#120,619 4 comentários 0 reações 1 responsável Ver no GitHub

@Fidget-Spinner já está trabalhando nisso.

Desde 1/9/2024.

3.14 interpreter-core performance
Linguagem predominante
Python
Estrelas
77.2k
Forks
36k
Métricas de merge de PRs
Métricas de PR pendentes

Descrição

Once an optimization pass is in place, it enables external contributors to make improvements.
It happened with the tier 1 specializer and is happening now with the tier 2 optimizer and JIT.
We should add the partial evaluation pass, so that external contributors can help with that.

The aim of the partial evaluation pass is to do computation, allocation and deallocation during optimization, so it doesn't need to be done at runtime.

We should add this pass, starting with a few very simple optimizations as placeholders for the full pass to be added later.
These optimizations should include:

  • Float unboxing
  • Temporary tuple elimination

We can start with the very simple optimization : BUILD_TUPLE 2; _RETURN_VALUE; UNPACK 2 -> _RETURN_PAIR before adding more complex optimizations in the future.

Linked PRs
  • gh-120624
  • gh-123652
  • gh-124518
  • gh-124846
  • gh-124910
  • gh-126856

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.