Tags: kjkrol/uid
Tags
feat(uid): batch allocation (NextN) and in-place pool Init Add UID64Pool.NextN(dst) to reserve many identifiers at once into a caller-owned buffer: it drains recycled indices, then allocates one contiguous run, growing the generation table at most once. ~2x faster per id for bulk creation, zero allocation. Refactor grow into a shared ensure(need) used by both Next and NextN. Replace the NewUID64Pool constructor with an in-place UID64Pool.Init method (params indexCap, recycleCap) for consistency with the rest of the ecosystem. Add package doc.go, runnable Example tests for the pool lifecycle and batch path, and update the README pool snippet to Init. BREAKING CHANGE: NewUID64Pool is removed; use `var p UID64Pool; p.Init(...)`.