Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
unmarshal: optimize slice capacity growth in unmarshalArray function (#…
…87) When unmarshaling an array from a plist file into a slice, two issues occur related to slice capacity growth: - Unnecessary growth: The slice grows even when the current capacity is enough to hold all elements. Specifically, the slice grows `if cnt >= val.Cap()`, even when the current capacity is sufficient. - Doubling capacity: The slice's capacity is always doubled, which is inefficient. It should follow a more dynamic growth pattern, similar to Go's built-in slice growth algorithm. Fixes #86
- Loading branch information