Benchmarks novos - #22
Merged
Merged
Conversation
Três novos benchmarks em C, Rust e Delegua para validar corretude e performance: crivo de Eratóstenes (escrita intensiva em arrays), soma de dígitos (loops com divisão e módulo), e Ackermann (recursão aninhada).
…o de entrada O CreateAlloca para slots temporários de adicionar, fatiar, filtrar e mapear era emitido no ponto de uso, causando crescimento ilimitado da stack quando chamado dentro de loops. Move esses allocas para o bloco de entrada da função via criarAllocaNoBlocoEntrada, reutilizando o mesmo slot em cada iteração. Restaura o benchmark do crivo para 1M.
…tores - Benchmark Pontos: cria 1M instâncias de classe Ponto com construtor inteiro, chama método distanciaManhattan. Testa compilação de classes. - Benchmark Árvore BST: insere 300K valores em BST baseada em arrays, busca 300K valores sequenciais. Testa manipulação de arrays grandes. - Corrige passagem de argumentos a construtores de classe: carrega valores de VariavelEscopo e converte tipos (i32 ↔ double) conforme a assinatura do construtor.
Testa fluxos completos de compilação: GET com leitura de status, corpo e mensagem; POST com cabeçalho customizado; múltiplos métodos (PUT, DELETE, PATCH) no mesmo cliente; e encadeamento de respostas entre chamadas.
There was a problem hiding this comment.
Pull request overview
Este PR adiciona novos benchmarks (C/Rust/Delégua) e amplia testes/geração de IR do compilador LLVM para cobrir fluxos mais completos e reduzir problemas de alocação em loops.
Changes:
- Adiciona benchmarks novos (crivo, soma de dígitos, Ackermann, pontos/classes, árvore BST) e integra no runner
benchmarks/executar.sh. - Expande testes da biblioteca
httpcom cenários de “fluxo completo” de cliente→requisição→resposta→cleanup. - Ajusta o
CompiladorLLVMpara inserirallocano bloco de entrada e tenta converter argumentos ao chamar construtores.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| testes/bibliotecas/http.test.ts | Novos testes de compilação cobrindo um fluxo completo de uso do módulo http. |
| fontes/compilador-llvm.ts | Mudanças em chamada de construtor (load/conversão de args) e novo helper para alloca no entry block aplicado a métodos de vetor. |
| benchmarks/executar.sh | Inclui novos benchmarks na suíte e valida saída esperada. |
| benchmarks/somadigitos.rs | Benchmark Rust: soma dos dígitos de 1..=10M. |
| benchmarks/somadigitos.delegua | Benchmark Delégua equivalente ao Rust/C. |
| benchmarks/somadigitos.c | Benchmark C equivalente ao Rust/Delégua. |
| benchmarks/pontos.rs | Benchmark Rust com struct e distância Manhattan em 1M iterações. |
| benchmarks/pontos.delegua | Benchmark Delégua com classe/construtor e método. |
| benchmarks/pontos.c | Benchmark C equivalente. |
| benchmarks/crivo.rs | Benchmark Rust: crivo até 1M. |
| benchmarks/crivo.delegua | Benchmark Delégua equivalente. |
| benchmarks/crivo.c | Benchmark C equivalente. |
| benchmarks/arvore.rs | Benchmark Rust: BST com arrays, inserir/buscar. |
| benchmarks/arvore.delegua | Benchmark Delégua equivalente. |
| benchmarks/arvore.c | Benchmark C equivalente. |
| benchmarks/ackermann.rs | Benchmark Rust: Ackermann(3, 11). |
| benchmarks/ackermann.delegua | Benchmark Delégua equivalente. |
| benchmarks/ackermann.c | Benchmark C equivalente. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.