From 780abed20a111cfedbc5833529557a574a18cf78 Mon Sep 17 00:00:00 2001 From: Estevao Fonseca Date: Sat, 5 Sep 2026 17:59:19 -0400 Subject: [PATCH 1/2] chore(benchmarks): runners em bash para Linux/macOS e primeiro cross-runtime em Ubuntu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Porta os três runners PowerShell para bash com o mesmo protocolo e a mesma saída: `run_benchmarks.sh` (suíte por binário, mediana), `interleaved_compare.sh` (dois binários intercalados, guard de CHECKSUM, benches sem equivalência pulados e listados) e `cross_runtime/run_cross_runtime.sh` (Noxy × CPython × Lua × Go, mínimo de N, coluna `--noxy-baseline` na mesma janela, líquido e razões). Números saem com ponto decimal fixo (`LC_NUMERIC=C`). `run_benchmarks.sh` pula e lista bench sem linha CHECKSUM em vez de abortar, como o intercalado já faz: hoje `bench_bst_owned`/`bench_bst_ref` não compilam na v0.25.0 (construtor com `null` em campo não-anulável) e `bench_hash31_bytes` nunca imprimiu CHECKSUM — o `.ps1` aborta no primeiro deles. Adiciona `cross_runtime/results/2026-09-05-v0250-ubuntu.md`: primeira medição em Linux (Ubuntu 26.04, CPython 3.14.4 do pacote, Go 1.27.1). As razões noxy/python são piores que as do Windows (fib 1,16x → 1,80x) porque o build gcc + PGO/LTO do CPython no Linux é mais rápido que o build MSVC; o Noxy rende igual nos três binários disponíveis. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_013tLpxkXEQZgrHZaQdAj1c7 --- AGENTS.md | 3 +- benchmarks/RESULTS.md | 11 ++ benchmarks/cross_runtime/README.md | 14 +- .../results/2026-09-05-v0250-ubuntu.md | 83 ++++++++ benchmarks/cross_runtime/run_cross_runtime.sh | 186 ++++++++++++++++++ benchmarks/interleaved_compare.sh | 66 +++++++ benchmarks/run_benchmarks.sh | 62 ++++++ 7 files changed, 423 insertions(+), 2 deletions(-) create mode 100644 benchmarks/cross_runtime/results/2026-09-05-v0250-ubuntu.md create mode 100755 benchmarks/cross_runtime/run_cross_runtime.sh create mode 100755 benchmarks/interleaved_compare.sh create mode 100755 benchmarks/run_benchmarks.sh diff --git a/AGENTS.md b/AGENTS.md index 1ad4a91f..2b7d5dc2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -58,7 +58,8 @@ lugar errado foi tocado; não afrouxe o teste: Benchmarks em `benchmarks/`: `pwsh -NoProfile -File interleaved_compare.ps1` (dois binários intercalados — a única comparação que vale), máquina ociosa, -delta só na mesma sessão; `compare_examples.ps1` captura a saída dos exemplos +delta só na mesma sessão; em Linux/macOS os mesmos runners existem em bash +(`interleaved_compare.sh`, `run_benchmarks.sh`, `cross_runtime/run_cross_runtime.sh`); `compare_examples.ps1` captura a saída dos exemplos antes/depois ao mexer no runtime. CI (`.github/workflows/network-deadlines.yml`): testes Go em ubuntu+windows, `-race` em `internal/vm`, o runner, cross-build com `CGO_ENABLED=0`. diff --git a/benchmarks/RESULTS.md b/benchmarks/RESULTS.md index 7e9e6ce9..7acec197 100644 --- a/benchmarks/RESULTS.md +++ b/benchmarks/RESULTS.md @@ -1495,6 +1495,17 @@ powershell -File benchmarks/cross_runtime/run_cross_runtime.ps1 -Noxy ` -NoxyBaseline -BaselineLabel v060 ``` +Em Linux/macOS, os mesmos três runners em bash (mesmo protocolo, mesma +saída; `compare_examples` continua só em PowerShell): + +```bash +benchmarks/run_benchmarks.sh --binary --label