We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
the sort.Strings() and a copy of finalizers - can we do a better version? should we optimize for a special case of 1,2 items?
sort.Strings()
The text was updated successfully, but these errors were encountered:
refactor: optimize the metadata.Equal for small number of finalizers
9dc62f9
It might be pretty common to have 1-2 finalizers, so we can do a special case for it. ``` name old time/op new time/op delta MetadataEqual/0-32 11.9ns ± 4% 11.8ns ± 4% ~ (p=0.971 n=4+4) MetadataEqual/1-32 219ns ±19% 14ns ± 2% -93.49% (p=0.029 n=4+4) MetadataEqual/2-32 273ns ± 7% 21ns ± 1% -92.36% (p=0.029 n=4+4) MetadataEqual/3-32 328ns ± 7% 310ns ± 7% ~ (p=0.200 n=4+4) name old alloc/op new alloc/op delta MetadataEqual/0-32 0.00B 0.00B ~ (all equal) MetadataEqual/1-32 80.0B ± 0% 0.0B -100.00% (p=0.029 n=4+4) MetadataEqual/2-32 112B ± 0% 0B -100.00% (p=0.029 n=4+4) MetadataEqual/3-32 144B ± 0% 144B ± 0% ~ (all equal) name old allocs/op new allocs/op delta MetadataEqual/0-32 0.00 0.00 ~ (all equal) MetadataEqual/1-32 4.00 ± 0% 0.00 -100.00% (p=0.029 n=4+4) MetadataEqual/2-32 4.00 ± 0% 0.00 -100.00% (p=0.029 n=4+4) MetadataEqual/3-32 4.00 ± 0% 4.00 ± 0% ~ (all equal) ``` Fixes cosi-project#306 Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
c7a41ed
smira
Successfully merging a pull request may close this issue.
the
sort.Strings()
and a copy of finalizers - can we do a better version? should we optimize for a special case of 1,2 items?The text was updated successfully, but these errors were encountered: