# valyala/bytebufferpool

Anti-memory-waste byte buffer pool

Repository: https://github.com/valyala/bytebufferpool
Canonical: https://ross.abutalabs.com/products/bytebufferpool
Language: Go
License: MIT
License Family: permissive
Last push: 2024-07-20T20:15:17+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3724, "days_push": 774, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1332, forks 143 (observed 2026-08-28T04:04:24.551402+00:00)

## What it is
A Go library implementing a pool of byte buffers with anti-memory-waste protection, limiting memory loss from fragmentation to the maximum total size of concurrently used buffers. It is used by high-performance projects like fasthttp and quicktemplate.

## Use cases
- reduce memory allocations in a high-throughput Go HTTP server
- reuse byte buffers to avoid garbage collection pressure
- pool buffers for fast serialization and templating workloads
- cut memory waste from buffer fragmentation in concurrent Go programs

## When to choose
- your Go application allocates many short-lived byte buffers under concurrency
- you want a small, dependency-free, battle-tested buffer pool used by fasthttp
- GC pressure from buffer allocations is hurting performance

## When to avoid
- you only need occasional buffer reuse where sync.Pool suffices
- your workload is single-threaded with tiny buffers and allocation cost is negligible

## Facets
- artifact type: library
- maturity: stable
- function: caching, concurrency, developer-tools
- domain: developer-tools, performance, backend
- platform: go, cross-platform
- tags: byte-buffer, memory-pool, object-pool, memory-optimization, go-library

## Member repositories
- valyala/bytebufferpool (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:24.551402+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:45:14.242773+00:00, confidence not recorded.
  - readme: https://github.com/valyala/bytebufferpool (fetched 2026-08-28T04:04:24.551402+00:00, sha 612e5d88046d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
