Benchmark comparison - #488
Merged
viniciussanchez merged 129 commits intoJul 3, 2026
Merged
Conversation
…ows ACL requirements
…ariable interpolation error
…S log regex parsing
… script to avoid dual-stack resolution conflicts
…ent early container exit
…string resolution
…) and resolve Sonar platform-dependent truncation in THorseCoreParam
…r (Horse.Provider.IOUring.pas)
…ts (IOCP) with OVERLAPPED on Windows
…error handling and middleware execution in Delphi
… and add integration tests
…ed integrity test script
… FPC/Lazarus compatibility
…C by using native string comparison
…d FPC by using TStringComparer.OrdinalIgnoreCase
…fecycle under FPC
…allback function pointer in Next under FPC
…st arrays to resolve GOT/PLT relocation correctly in FPC Linux x64
…er value extraction in debug prints
…ler GOT/PLT relocation evaluation corruptions
…invocations under FPC
…lper under FPC DELPHI mode to avoid implicit call evaluation
…nsure maximum performance in benchmarks
… define in Radix Router Execute for Delphi compatibility
… requests synchronously in FPC Epoll workers, bypassing thread pools to achieve maximum RPS with zero context switches
…d remove it from git tracking
…tore FPC epoll async GTaskPool build
…h on accept/writev, doubling FPC TaskPool count, and enabling UNIX cmem memory allocator for lock-free heap performance
…ero-allocation TByteSpan request parser in FPC Epoll, accelerating FPC Epoll to 31.3K RPS
…olution with direct linear memory scans and formatting
…ion buffer to eliminate heap churn; feat(iouring): add FPC IOUring benchmark suite subclassing THorseProviderEpoll
…vents array to 256 L1 cache sweet-spot
…ring provider and benchmark suite
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.
Relatório Técnico de Otimização e Integridade
Este documento consolida todas as intervenções de engenharia, refatorações de código e melhorias de performance implementadas no framework Horse para atingir throughput máximo com latência reduzida no Linux (via Epoll) e Windows (via HTTP.sys), além do novo sistema de roteamento Radix.
🚀 1. Otimizações de Rede & Sockets (FPC Epoll & HTTP.sys)
FPC Epoll (
src/Horse.Provider.Epoll.pas)L-Events), mitigando alocações dinâmicas de heap de memória e eliminando falhas de página (page faults) no kernel Linux.TEpollConnectionContext. Isso evitou que o coletor de lixo do compilador FPC bloqueasse threads sob alta concorrência.Windows HTTP.sys (
src/Horse.Provider.HttpSys.pas)THorseContextPool.⚡ 2. Roteamento Ultrarrápido (Radix Router)
Roteador de Prefixos Radix (
src/Horse.Core.Router.Radix.pas[NEW])*) e isolamento de middlewares.Otimizações no RouterTree Padrão (
src/Horse.Core.RouterTree.pas)THorseBufferSlice.Compare(string)no lugar de operações nativas de comparação e slicing de strings (comoCopye=).🧪 3. Cobertura de Testes & Integridade Condicional
Testes do Radix Router (
tests/src/tests/Tests.Horse.Core.Router.Radix.pas[NEW])Suporte de Teste Condicional (
tests/src/tests/Tests.CleanupHelper.pas&tests/src/Console.dpr)-dHORSE_RADIX_ROUTER. Quando ativa, ela força o test runner a resetar e utilizar oTHorseRadixRouterem toda a suíte de integridade.📊 4. Ambiente de Benchmark Consolidado
benchmarks/run-bench.ps1) para orquestrar a execução local e coletar resultados consolidados.