Skip to content

v1.3.0

Choose a tag to compare

@emar-kar emar-kar released this 13 Mar 14:58
· 4 commits to main since this release
f9a878c

New Features

  • Now natively supports errors.Is and errors.As, allowing you to query for specific target errors within the buffer.
  • Nested Flattening: BufferedError now intelligently unwraps and flattens nested BufferedError additions into a single robust slice, eliminating cyclic data-structure risks and boosting read performance.

Fixes & Stability

  • Data Races Eliminated: Fixed complex concurrency data races across Add(), Grow(), and recursive multiline parsing. The buffer is now 100% thread-safe under parallel scaling.
  • Memory Leaks Plugged: Bound sync.Pool builder caching to a maximum of 32 KB per object, fixing silent memory leaks from formatting massive multi-megabyte string dumps.

Performance & Zero-Allocation Optimizations

  • Zero-Allocation Clear(): The Clear() method now retains the underlying backing array capacity while zeroing out element references. This allows batch processing loops to function with exactly 0 allocs/op.
  • Amortized Fast Appends: Heavy algorithmic passes over Add() and Error() reduce operations limits to the exact runtime boundaries. Parallel and single-append loops now execute securely without forcing native array duplication overheads.