Skip to content

v1.2.31

@xtaci xtaci tagged this 28 Jan 08:57
- Add pre-allocated results slice to watcher struct to reuse across
  WaitIO calls, reducing GC pressure in high-throughput scenarios
- Replace reflect.ValueOf().Pointer() with unsafe pointer extraction
  in aioCreate() and handleGC() for faster pointer retrieval
- Remove reflect package import as it's no longer needed

Benchmark results (BenchmarkEcho1K):
  Before: 478 B/op, 4 allocs/op
  After:  0 B/op, 0 allocs/op

Memory profile shows WaitIO allocation dropped from 60.51MB to 0MB,
which is critical for C10K+ concurrent connection scenarios.
Assets 2
Loading