Skip to content

Commit 32f00bc

Browse files
committed
docs: clarify near-zero allocations on fasthttp hot path
1 parent 1c3d3c1 commit 32f00bc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

USER_GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ STATIC_CACHE_PRELOAD=true STATIC_CACHE_GC_PERCENT=400 ./bin/static-web
638638
639639
### GC tuning
640640
641-
`gc_percent` sets the Go runtime `GOGC` target. A higher value means the GC runs less often, trading memory for throughput. The handler's hot path is allocation-free, and fasthttp reuses per-connection buffers (unlike net/http which allocates per-request). Recommended values:
641+
`gc_percent` sets the Go runtime `GOGC` target. A higher value means the GC runs less often, trading memory for throughput. The handler's hot path has near-zero allocations, and fasthttp reuses per-connection buffers (unlike net/http which allocates per-request). Recommended values:
642642
643643
| `gc_percent` | Behaviour |
644644
|---|---|

docs/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ <h2 class="section-title" id="performance-heading">Performance Benchmarks</h2>
632632
<div class="perf-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9.5 2A2.5 2.5 0 0 1 12 4.5v15a2.5 2.5 0 0 1-4.96.44 2.5 2.5 0 0 1-2.96-3.08 3 3 0 0 1-.34-5.58 2.5 2.5 0 0 1 1.32-4.24 2.5 2.5 0 0 1 1.98-3A2.5 2.5 0 0 1 9.5 2Z"/><path d="M14.5 2A2.5 2.5 0 0 0 12 4.5v15a2.5 2.5 0 0 0 4.96.44 2.5 2.5 0 0 0 2.96-3.08 3 3 0 0 0 .34-5.58 2.5 2.5 0 0 0-1.32-4.24 2.5 2.5 0 0 0-1.98-3A2.5 2.5 0 0 0 14.5 2Z"/></svg></div>
633633
<h3>fasthttp + Preload</h3>
634634
<p>
635-
Built on <strong>fasthttp</strong> with zero per-request allocations. <code>--preload</code> loads all files into RAM at startup. Cache hits use direct <code>ctx.SetBody()</code> with pre-formatted headers.
635+
Built on <strong>fasthttp</strong> with near-zero per-request allocations. <code>--preload</code> loads all files into RAM at startup. Cache hits use direct <code>ctx.SetBody()</code> with pre-formatted headers.
636636
</p>
637637
</div>
638638
<div class="perf-card">
@@ -646,7 +646,7 @@ <h3>55% Faster Than Bun</h3>
646646
<div class="perf-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 12h-4l-3 9L9 3l-3 9H2"/></svg></div>
647647
<h3>GC tuned</h3>
648648
<p>
649-
<code>gc_percent = 400</code> reduces GC frequency by 4x. The hot path is allocation-free — fasthttp reuses per-connection buffers, eliminating the per-request allocations of net/http.
649+
<code>gc_percent = 400</code> reduces GC frequency by 4x. The hot path has near-zero allocations — fasthttp reuses per-connection buffers, eliminating the per-request allocations of net/http.
650650
</p>
651651
</div>
652652
</div>

0 commit comments

Comments
 (0)