Repository navigation
v0.5.0
Performance: 28% faster compression, 99% fewer allocations
Compression speed on ERR532393_1 (8.9GB Illumina reads, M4 MacBook Pro): 3.3s at 2,922 MB/s (was 4.6s at 1,991 MB/s in v0.4.0).
Changes
- Record.Header as
[]byte: eliminates string allocation per FASTQ record - RecordBatch pooling: reusable batch structs with shared backing buffer via
sync.Pool - Append-style encoders:
AppendPackedBases/AppendUnpackBasesencode into caller-provided buffers (zero allocations) - Zero-copy decompression: direct buffer writes using
AvailableBuffer()and in-place delta decode - Buffer pooling throughout compress and decompress pipelines
Micro-benchmarks (10k records, 5 runs)
| Benchmark | v0.4.0 | v0.5.0 | Change |
|---|---|---|---|
| Compress | 6.3ms, 20k allocs | 4.4ms, 281 allocs | -30% time, -98.6% allocs |
| Decompress | 4.5ms, 30k allocs | 2.3ms, 273 allocs | -49% time, -99.1% allocs |
| CompressBlock | 23.7ms, 100k allocs | 18.9ms, 18 allocs | -20% time, -99.98% allocs |
Full Changelog: v0.4.0...v0.5.0