| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2026-08-04 | 575 Bytes | |
| v4.4.1 -- Performance_ 36_ fewer allocations source code.tar.gz | 2026-08-04 | 54.7 kB | |
| v4.4.1 -- Performance_ 36_ fewer allocations source code.zip | 2026-08-04 | 80.6 kB | |
| Totals: 3 Items | 135.9 kB | 0 | |
Performance
Struct field offset cache eliminates repeated reflect.StructField allocations.
| Benchmark | v4.4.0 | v4.4.1 | Improvement |
|---|---|---|---|
| ValidateStruct (6 fields) | 59 allocs, 4.7 KB, 6.7µs | 38 allocs, 2.3 KB, 3.6µs | -36% allocs, -50% memory, -46% time |
| ValidateWithConditional | 34 allocs, 3.8µs | 19 allocs, 1.7µs | -44% allocs, -56% time |
Also fixes benchmark to pre-compile regex (was inflating alloc count).
Full Changelog: https://github.com/go-ozzo/ozzo-validation/compare/v4.4.0...v4.4.1