# Trest performance evidence — 13 November 2026

These are recorded development measurements discussed in “Reducing request overhead in Trest”, published 15 November 2026. They were not rerun for the article.

Trest did not beat both Gin and Echo. IDs, deadlines, validation, and authorization remained enabled.

| Workload | Trest before, µs/op | Trest after, µs/op | Time reduction | Allocations before → after |
| --- | ---: | ---: | ---: | ---: |
| JSON hello | 3.568 | 2.544 | 28.70% | 32 → 18 |
| Warmed duplicate invoice | 6.600 | 4.7975 | 27.31% | 48 → 34 |

Both before/after timing differences have p < 0.001. The baseline already includes the 11 November optimizations. The percentages measure the whole additional batch, not individual changes.

| Current workload | Trest, µs/op | Gin v1.12.0, µs/op | Echo v5.4.4, µs/op |
| --- | ---: | ---: | ---: |
| JSON hello | 2.544 | 2.1625 | 2.201 |
| Warmed duplicate invoice | 4.7975 | 4.7655 | 4.848 |
| Cancelable-parent hello | 3.4825 | 2.3575 | 2.405 |
| Cancelable-parent duplicate invoice | 5.802 | 4.942 | 5.014 |

Hello remains 17.64% slower than Gin. The invoice difference from Gin is inconclusive (p = 0.701), not a win. Cancelable-parent cases are separate current-only measurements, not before/after improvements.

## Method and limits

- Apple M2 Pro, macOS arm64, Go 1.27.3, GOMAXPROCS=1, Gin release mode.
- Fourteen paired samples per main case, each timed for at least 500 ms; two frozen non-race binaries, 168 main samples.
- Framework, workload, and before/after order rotated. Fixtures and dependency pins stayed unchanged.
- Fresh httptest requests and recorders are included. Network, TLS, databases, startup, and contract export are excluded.
- Invoice measures warmed duplicate lookup, not insertion.
- Common business policies are checked, but parser edges, headers, and feature sets differ.
- The shared host had no system-wide load control or CPU affinity. Task-owned builds, tests, and benchmarks did not overlap.
- Main unchanged Gin/Echo controls had no statistically significant before/after timing shift.
- These measurements do not establish production latency, concurrent throughput, or an irreducible floor.

## Files

- [before.txt](before.txt), [after.txt](after.txt): original main samples.
- [benchstat.txt](benchstat.txt): original before/after analysis.
- [summary.json](summary.json): exact medians and allocation counts.
- [gin-echo-comparison.txt](gin-echo-comparison.txt), [echo-comparison.txt](echo-comparison.txt): main framework comparisons.
- [cancelable/samples.txt](cancelable/samples.txt), [cancelable/benchstat.txt](cancelable/benchstat.txt): supplemental current-only measurements.
- [run.json](run.json): original main execution order and binary hashes; local executable paths omitted.
- [greeting.go](greeting.go): a standalone runnable greeting example, separate from measured fixtures.

This bundle contains measurement evidence, not frozen executables or a complete source reconstruction. Temporary column labels in benchstat output are preserved from the recorded analysis.

## Recorded verification

All seven modules passed race tests, vet, and builds, including generated-client and WebSocket checks. Core Go 1.23.12 checks passed; lint reported zero issues; differential fuzzing completed 1,743,257 executions. Optional real PostgreSQL integration tests were not rerun.

Five subsequent isolated candidates were not merged into the measured production version. They are not additional speedups claimed by this article.
