Skip to content

Conversation

@TerryHowe
Copy link

Replace dependency on mitchellh/copystructure

Closes: #456

The implementation in github.com/mitchellh/copystructure has many features which we were not using, so I expected and got better performance

go test -bench=. -benchmem ./internal/copystructure/
goos: darwin
goarch: arm64
pkg: helm.sh/helm/v4/internal/copystructure
cpu: Apple M1
BenchmarkInternalCopy-8              	  271351	      4429 ns/op	    5264 B/op	     111 allocs/op
BenchmarkMitchellhCopy-8             	   61238	     19645 ns/op	   15008 B/op	     433 allocs/op
BenchmarkInternalCopyLargeMap-8      	    1364	    889158 ns/op	  808347 B/op	   19022 allocs/op
BenchmarkMitchellhCopyLargeMap-8     	     315	   3784941 ns/op	 2130339 B/op	   75045 allocs/op
BenchmarkInternalCopyDeepNested-8    	   44197	     27205 ns/op	   27648 B/op	     651 allocs/op
BenchmarkMitchellhCopyDeepNested-8   	    5334	    226008 ns/op	   95231 B/op	    2696 allocs/op
PASS

Benchmark that is not included in PR https://gist.github.com/TerryHowe/f53f97016389c6d9cc849f573487d44c

@TerryHowe TerryHowe force-pushed the chore-remove-mitchellh-dependency branch from 9194e77 to 7d6f75e Compare September 29, 2025 18:20
@TerryHowe TerryHowe force-pushed the chore-remove-mitchellh-dependency branch from 7d6f75e to 93be898 Compare September 29, 2025 18:23
@SanMasood
Copy link

Thanks for updating this package! Is there a timeline as to when this change will get merged please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace deprecated mitchellh/copystructure

3 participants