Skip to content

Instantly share code, notes, and snippets.

@goldeneggg
Last active August 17, 2021 03:00
Show Gist options
  • Save goldeneggg/a1d30880bd737468ee05be5cc658415f to your computer and use it in GitHub Desktop.
Save goldeneggg/a1d30880bd737468ee05be5cc658415f to your computer and use it in GitHub Desktop.
benchstat Go 1.17 vs 1.16 on GitHub Actions using https://github.com/goldeneggg/structil (1.17 is very faster)
name old time/op new time/op delta
pkg:github.com/goldeneggg/structil goos:linux goarch:amd64
NewGetter_Val 690ns ± 6% 568ns ± 0% -17.66% (p=0.008 n=5+5)
NewGetter_Val-2 737ns ± 2% 584ns ± 4% -20.82% (p=0.016 n=5+4)
NewGetter_Ptr 556ns ± 3% 391ns ± 1% -29.62% (p=0.008 n=5+5)
NewGetter_Ptr-2 616ns ±11% 443ns ± 4% -28.15% (p=0.008 n=5+5)
GetterGetType_String 24.4ns ± 3% 13.6ns ± 0% -44.15% (p=0.008 n=5+5)
GetterGetType_String-2 24.2ns ± 2% 13.7ns ± 0% -43.53% (p=0.008 n=5+5)
GetterGetValue_String 24.4ns ± 6% 13.9ns ± 0% -43.12% (p=0.008 n=5+5)
GetterGetValue_String-2 24.5ns ± 3% 13.9ns ± 0% -43.23% (p=0.016 n=5+4)
GetterHas_String 13.6ns ± 0% 8.3ns ± 0% -39.30% (p=0.016 n=4+5)
GetterHas_String-2 13.7ns ± 3% 8.3ns ± 0% -39.41% (p=0.016 n=5+4)
GetterGet_String 24.2ns ± 2% 13.7ns ± 0% -43.21% (p=0.008 n=5+5)
GetterGet_String-2 24.1ns ± 2% 14.5ns ± 8% -39.98% (p=0.008 n=5+5)
GetterString 27.2ns ± 1% 15.1ns ± 0% -44.37% (p=0.008 n=5+5)
GetterString-2 27.5ns ± 3% 15.1ns ± 0% -44.93% (p=0.016 n=5+4)
GetterUintptr 27.7ns ± 2% 17.2ns ± 0% -37.93% (p=0.008 n=5+5)
GetterUintptr-2 28.6ns ± 1% 16.0ns ± 8% -43.85% (p=0.008 n=5+5)
GetterUnsafePointer 27.4ns ± 2% 15.0ns ± 0% -45.03% (p=0.008 n=5+5)
GetterUnsafePointer-2 26.8ns ± 1% 15.1ns ± 0% -43.78% (p=0.016 n=5+4)
GetterIsStruct 23.5ns ± 2% 13.9ns ± 0% -40.61% (p=0.016 n=5+4)
GetterIsStruct-2 23.6ns ± 3% 14.3ns ± 5% -39.35% (p=0.008 n=5+5)
GetterIsSlice_Bytes 23.2ns ± 2% 13.9ns ± 0% -39.91% (p=0.008 n=5+5)
GetterIsSlice_Bytes-2 23.1ns ± 3% 13.9ns ± 0% -39.76% (p=0.008 n=5+5)
GetterIsSlice_StructSlice 23.5ns ± 2% 13.9ns ± 0% -40.61% (p=0.008 n=5+5)
GetterIsSlice_StructSlice-2 23.2ns ± 2% 13.9ns ± 0% -39.83% (p=0.008 n=5+5)
GetterIsSlice_StructPtrSlice 23.4ns ± 4% 13.9ns ± 0% -40.35% (p=0.016 n=5+4)
GetterIsSlice_StructPtrSlice-2 23.7ns ± 5% 13.9ns ± 0% -41.32% (p=0.008 n=5+5)
GetterMapGet 3.36µs ± 2% 2.59µs ± 1% -22.91% (p=0.008 n=5+5)
GetterMapGet-2 3.60µs ± 8% 2.85µs ± 6% -20.94% (p=0.008 n=5+5)
NewFinder_Val 953ns ±10% 728ns ± 0% -23.54% (p=0.008 n=5+5)
NewFinder_Val-2 972ns ± 2% 789ns ± 2% -18.84% (p=0.008 n=5+5)
NewFinder_Ptr 885ns ± 7% 712ns ± 0% -19.58% (p=0.008 n=5+5)
NewFinder_Ptr-2 895ns ± 2% 699ns ± 7% -21.94% (p=0.008 n=5+5)
ToMap_1FindOnly 434ns ± 4% 319ns ± 0% -26.59% (p=0.008 n=5+5)
ToMap_1FindOnly-2 445ns ± 7% 352ns ± 4% -20.99% (p=0.008 n=5+5)
ToMap_2FindOnly 557ns ± 5% 466ns ± 1% -16.42% (p=0.008 n=5+5)
ToMap_2FindOnly-2 575ns ± 1% 441ns ±10% -23.23% (p=0.008 n=5+5)
ToMap_1Struct_1Find 591ns ± 4% 440ns ± 1% -25.55% (p=0.008 n=5+5)
ToMap_1Struct_1Find-2 614ns ± 1% 460ns ± 3% -25.03% (p=0.008 n=5+5)
ToMap_1Struct_1Find_2Pair 939ns ± 5% 700ns ± 3% -25.39% (p=0.008 n=5+5)
ToMap_1Struct_1Find_2Pair-2 959ns ± 1% 731ns ± 3% -23.74% (p=0.008 n=5+5)
ToMap_2Struct_1Find 817ns ± 3% 591ns ± 1% -27.61% (p=0.008 n=5+5)
ToMap_2Struct_1Find-2 822ns ± 3% 669ns ± 2% -18.60% (p=0.008 n=5+5)
ToMap_2Struct_2Find 1.01µs ± 6% 0.74µs ± 1% -26.80% (p=0.008 n=5+5)
ToMap_2Struct_2Find-2 988ns ± 5% 806ns ± 6% -18.47% (p=0.008 n=5+5)
NewFinderKeys_yml 135µs ± 4% 105µs ± 6% -22.44% (p=0.008 n=5+5)
NewFinderKeys_yml-2 138µs ± 2% 105µs ± 4% -23.71% (p=0.008 n=5+5)
NewFinderKeys_json 89.3µs ± 4% 74.8µs ± 7% -16.25% (p=0.008 n=5+5)
NewFinderKeys_json-2 92.1µs ± 3% 77.0µs ± 3% -16.42% (p=0.008 n=5+5)
pkg:github.com/goldeneggg/structil/dynamicstruct goos:linux goarch:amd64
AddString 133ns ± 4% 88ns ± 0% -34.13% (p=0.008 n=5+5)
AddString-2 131ns ± 5% 93ns ± 5% -28.92% (p=0.008 n=5+5)
AddStringWithTag 137ns ± 2% 89ns ± 0% -35.23% (p=0.008 n=5+5)
AddStringWithTag-2 138ns ± 3% 93ns ± 8% -32.98% (p=0.008 n=5+5)
AddInt 136ns ± 3% 98ns ± 0% -27.38% (p=0.008 n=5+5)
AddInt-2 136ns ± 2% 91ns ± 3% -33.20% (p=0.008 n=5+5)
AddFloa32 134ns ± 3% 90ns ± 0% -33.12% (p=0.008 n=5+5)
AddFloa32-2 137ns ± 2% 94ns ± 4% -31.54% (p=0.008 n=5+5)
AddFloa64 133ns ± 7% 100ns ± 0% -25.04% (p=0.008 n=5+5)
AddFloa64-2 136ns ± 2% 94ns ± 5% -30.76% (p=0.008 n=5+5)
AddBool 135ns ± 3% 88ns ± 0% -34.99% (p=0.008 n=5+5)
AddBool-2 135ns ± 3% 97ns ± 8% -28.60% (p=0.008 n=5+5)
AddMap 245ns ± 2% 167ns ± 0% -32.01% (p=0.008 n=5+5)
AddMap-2 252ns ± 6% 172ns ± 6% -32.07% (p=0.008 n=5+5)
AddFunc 664ns ± 2% 475ns ± 1% -28.50% (p=0.008 n=5+5)
AddFunc-2 674ns ± 3% 532ns ± 2% -21.03% (p=0.008 n=5+5)
AddChanBoth 192ns ± 5% 144ns ± 0% -25.08% (p=0.008 n=5+5)
AddChanBoth-2 191ns ± 5% 132ns ± 3% -31.26% (p=0.008 n=5+5)
AddChanRecv 205ns ± 6% 127ns ± 0% -38.11% (p=0.008 n=5+5)
AddChanRecv-2 200ns ± 8% 134ns ± 4% -32.75% (p=0.008 n=5+5)
AddChanSend 196ns ± 1% 130ns ± 0% -33.88% (p=0.008 n=5+5)
AddChanSend-2 206ns ± 3% 134ns ± 4% -34.85% (p=0.008 n=5+5)
AddStruct 11.1µs ± 6% 8.3µs ± 1% -25.59% (p=0.008 n=5+5)
AddStruct-2 10.8µs ± 3% 8.7µs ± 3% -19.91% (p=0.008 n=5+5)
AddStructPtr 10.6µs ± 4% 8.1µs ± 1% -23.65% (p=0.008 n=5+5)
AddStructPtr-2 11.1µs ± 6% 8.9µs ± 7% -19.14% (p=0.008 n=5+5)
AddSlice 204ns ± 3% 146ns ± 8% -28.25% (p=0.008 n=5+5)
AddSlice-2 206ns ± 3% 142ns ± 6% -31.39% (p=0.008 n=5+5)
AddInterface 139ns ± 3% 89ns ± 0% -36.24% (p=0.008 n=5+5)
AddInterface-2 150ns ± 0% 93ns ± 8% -38.13% (p=0.016 n=4+5)
AddInterfacePtr 164ns ± 5% 99ns ± 0% -39.48% (p=0.008 n=5+5)
AddInterfacePtr-2 152ns ± 4% 101ns ± 5% -33.33% (p=0.008 n=5+5)
Build 50.7µs ± 8% 37.6µs ±10% -25.89% (p=0.008 n=5+5)
Build-2 42.7µs ± 3% 36.2µs ± 9% -15.12% (p=0.008 n=5+5)
BuildNonPtr 54.8µs ± 8% 43.0µs ± 1% -21.50% (p=0.008 n=5+5)
BuildNonPtr-2 43.6µs ± 4% 36.1µs ± 3% -17.16% (p=0.008 n=5+5)
Definition 2.89ns ± 4% 2.01ns ± 0% -30.36% (p=0.016 n=5+4)
Definition-2 2.88ns ± 4% 1.78ns ± 0% -38.44% (p=0.000 n=5+4)
pkg:github.com/goldeneggg/structil/dynamicstruct/decoder goos:linux goarch:amd64
DynamicStructSingleJSON 41.8µs ± 3% 31.7µs ± 0% -24.26% (p=0.008 n=5+5)
DynamicStructSingleJSON-2 38.8µs ± 6% 29.5µs ± 1% -24.11% (p=0.016 n=5+4)
DynamicStructArrayJSON 49.4µs ± 7% 41.3µs ± 1% -16.45% (p=0.008 n=5+5)
DynamicStructArrayJSON-2 50.1µs ± 6% 39.2µs ± 4% -21.76% (p=0.008 n=5+5)
DynamicStructSingleYAML 88.5µs ± 4% 68.8µs ± 1% -22.27% (p=0.008 n=5+5)
DynamicStructSingleYAML-2 85.5µs ± 8% 64.0µs ± 1% -25.13% (p=0.008 n=5+5)
DynamicStructArrayYAML 136µs ± 7% 100µs ± 7% -26.59% (p=0.008 n=5+5)
DynamicStructArrayYAML-2 144µs ± 3% 102µs ± 3% -29.46% (p=0.008 n=5+5)
pkg:github.com/goldeneggg/structil/util goos:linux goarch:amd64
ToI_String 12.2ns ± 1% 5.9ns ± 0% -51.58% (p=0.008 n=5+5)
ToI_String-2 11.2ns ± 4% 5.9ns ± 0% -47.01% (p=0.016 n=5+4)
ToI_Int 11.2ns ± 2% 5.9ns ± 0% -47.03% (p=0.008 n=5+5)
ToI_Int-2 11.2ns ± 2% 6.7ns ± 0% -40.19% (p=0.016 n=5+4)
ToI_StructPtr 11.3ns ± 0% 5.9ns ± 0% -47.85% (p=0.016 n=4+5)
ToI_StructPtr-2 11.1ns ± 3% 5.9ns ± 0% -46.92% (p=0.008 n=5+5)
ToI_Map 10.9ns ± 2% 5.9ns ± 0% -45.89% (p=0.016 n=5+4)
ToI_Map-2 10.9ns ± 1% 5.9ns ± 0% -46.09% (p=0.008 n=5+5)
ToI_Func 11.0ns ± 1% 5.9ns ± 0% -46.46% (p=0.016 n=5+4)
ToI_Func-2 11.0ns ± 4% 5.9ns ± 0% -46.28% (p=0.008 n=5+5)
ToI_Chan 10.9ns ± 2% 5.9ns ± 0% -45.69% (p=0.008 n=5+5)
ToI_Chan-2 11.1ns ± 3% 5.9ns ± 0% -46.61% (p=0.008 n=5+5)
ToI_Nil 3.28ns ± 7% 1.92ns ± 0% -41.48% (p=0.008 n=5+5)
ToI_Nil-2 3.31ns ± 4% 1.92ns ± 0% -41.84% (p=0.016 n=5+4)
ElemTypeOf_String 24.5ns ± 2% 17.1ns ± 1% -30.21% (p=0.008 n=5+5)
ElemTypeOf_String-2 24.8ns ± 3% 19.0ns ± 6% -23.63% (p=0.008 n=5+5)
ElemTypeOf_Int 24.0ns ± 2% 17.3ns ± 0% -27.94% (p=0.008 n=5+5)
ElemTypeOf_Int-2 24.5ns ± 4% 18.6ns ± 4% -23.95% (p=0.008 n=5+5)
ElemTypeOf_StructPtr 23.7ns ± 5% 17.2ns ± 1% -27.70% (p=0.008 n=5+5)
ElemTypeOf_StructPtr-2 24.1ns ± 2% 18.7ns ± 4% -22.16% (p=0.008 n=5+5)
ElemTypeOf_Map 24.9ns ± 5% 17.2ns ± 1% -30.79% (p=0.008 n=5+5)
ElemTypeOf_Map-2 24.8ns ± 3% 18.4ns ± 4% -25.78% (p=0.008 n=5+5)
ElemTypeOf_Func 24.2ns ± 9% 17.3ns ± 0% -28.33% (p=0.008 n=5+5)
ElemTypeOf_Func-2 24.5ns ± 4% 19.0ns ± 6% -22.15% (p=0.008 n=5+5)
ElemTypeOf_Chan 24.6ns ± 5% 17.1ns ± 1% -30.60% (p=0.008 n=5+5)
ElemTypeOf_Chan-2 23.7ns ± 2% 18.5ns ± 4% -22.06% (p=0.008 n=5+5)
ElemTypeOf_Error 23.9ns ± 5% 17.1ns ± 0% -28.50% (p=0.008 n=5+5)
ElemTypeOf_Error-2 24.3ns ± 4% 18.0ns ± 5% -25.76% (p=0.008 n=5+5)
ElemTypeOf_Nil 23.4ns ± 2% 17.1ns ± 0% -27.02% (p=0.008 n=5+5)
ElemTypeOf_Nil-2 24.2ns ± 4% 18.3ns ± 6% -24.36% (p=0.008 n=5+5)
RecoverToError 22.9µs ± 1% 14.2µs ± 0% -37.94% (p=0.016 n=5+4)
RecoverToError-2 24.3µs ± 2% 16.3µs ± 4% -32.88% (p=0.008 n=5+5)
name old alloc/op new alloc/op delta
pkg:github.com/goldeneggg/structil goos:linux goarch:amd64
NewGetter_Val 1.20kB ± 0% 1.20kB ± 0% ~ (all equal)
NewGetter_Val-2 1.20kB ± 0% 1.20kB ± 0% ~ (all equal)
NewGetter_Ptr 848B ± 0% 848B ± 0% ~ (all equal)
NewGetter_Ptr-2 848B ± 0% 848B ± 0% ~ (all equal)
GetterGetType_String 0.00B 0.00B ~ (all equal)
GetterGetType_String-2 0.00B 0.00B ~ (all equal)
GetterGetValue_String 0.00B 0.00B ~ (all equal)
GetterGetValue_String-2 0.00B 0.00B ~ (all equal)
GetterHas_String 0.00B 0.00B ~ (all equal)
GetterHas_String-2 0.00B 0.00B ~ (all equal)
GetterGet_String 0.00B 0.00B ~ (all equal)
GetterGet_String-2 0.00B 0.00B ~ (all equal)
GetterString 0.00B 0.00B ~ (all equal)
GetterString-2 0.00B 0.00B ~ (all equal)
GetterUintptr 0.00B 0.00B ~ (all equal)
GetterUintptr-2 0.00B 0.00B ~ (all equal)
GetterUnsafePointer 0.00B 0.00B ~ (all equal)
GetterUnsafePointer-2 0.00B 0.00B ~ (all equal)
GetterIsStruct 0.00B 0.00B ~ (all equal)
GetterIsStruct-2 0.00B 0.00B ~ (all equal)
GetterIsSlice_Bytes 0.00B 0.00B ~ (all equal)
GetterIsSlice_Bytes-2 0.00B 0.00B ~ (all equal)
GetterIsSlice_StructSlice 0.00B 0.00B ~ (all equal)
GetterIsSlice_StructSlice-2 0.00B 0.00B ~ (all equal)
GetterIsSlice_StructPtrSlice 0.00B 0.00B ~ (all equal)
GetterIsSlice_StructPtrSlice-2 0.00B 0.00B ~ (all equal)
GetterMapGet 3.44kB ± 0% 3.44kB ± 0% ~ (all equal)
GetterMapGet-2 3.44kB ± 0% 3.44kB ± 0% ~ (all equal)
NewFinder_Val 1.33kB ± 0% 1.33kB ± 0% ~ (all equal)
NewFinder_Val-2 1.33kB ± 0% 1.33kB ± 0% ~ (all equal)
NewFinder_Ptr 1.07kB ± 0% 1.07kB ± 0% ~ (all equal)
NewFinder_Ptr-2 1.07kB ± 0% 1.07kB ± 0% ~ (all equal)
ToMap_1FindOnly 352B ± 0% 352B ± 0% ~ (all equal)
ToMap_1FindOnly-2 352B ± 0% 352B ± 0% ~ (all equal)
ToMap_2FindOnly 368B ± 0% 368B ± 0% ~ (all equal)
ToMap_2FindOnly-2 368B ± 0% 368B ± 0% ~ (all equal)
ToMap_1Struct_1Find 376B ± 0% 376B ± 0% ~ (all equal)
ToMap_1Struct_1Find-2 376B ± 0% 376B ± 0% ~ (all equal)
ToMap_1Struct_1Find_2Pair 424B ± 0% 424B ± 0% ~ (all equal)
ToMap_1Struct_1Find_2Pair-2 424B ± 0% 424B ± 0% ~ (all equal)
ToMap_2Struct_1Find 448B ± 0% 448B ± 0% ~ (all equal)
ToMap_2Struct_1Find-2 448B ± 0% 448B ± 0% ~ (all equal)
ToMap_2Struct_2Find 512B ± 0% 512B ± 0% ~ (all equal)
ToMap_2Struct_2Find-2 512B ± 0% 512B ± 0% ~ (all equal)
NewFinderKeys_yml 27.2kB ± 0% 27.2kB ± 0% ~ (p=0.532 n=5+5)
NewFinderKeys_yml-2 27.2kB ± 0% 27.2kB ± 0% ~ (p=1.000 n=5+5)
NewFinderKeys_json 14.7kB ± 0% 14.7kB ± 0% -0.22% (p=0.008 n=5+5)
NewFinderKeys_json-2 14.7kB ± 0% 14.7kB ± 0% -0.22% (p=0.008 n=5+5)
pkg:github.com/goldeneggg/structil/dynamicstruct goos:linux goarch:amd64
AddString 16.0B ± 0% 16.0B ± 0% ~ (all equal)
AddString-2 16.0B ± 0% 16.0B ± 0% ~ (all equal)
AddStringWithTag 16.0B ± 0% 16.0B ± 0% ~ (all equal)
AddStringWithTag-2 16.0B ± 0% 16.0B ± 0% ~ (all equal)
AddInt 16.0B ± 0% 16.0B ± 0% ~ (all equal)
AddInt-2 16.0B ± 0% 16.0B ± 0% ~ (all equal)
AddFloa32 16.0B ± 0% 16.0B ± 0% ~ (all equal)
AddFloa32-2 16.0B ± 0% 16.0B ± 0% ~ (all equal)
AddFloa64 16.0B ± 0% 16.0B ± 0% ~ (all equal)
AddFloa64-2 16.0B ± 0% 16.0B ± 0% ~ (all equal)
AddBool 16.0B ± 0% 16.0B ± 0% ~ (all equal)
AddBool-2 16.0B ± 0% 16.0B ± 0% ~ (all equal)
AddMap 32.0B ± 0% 32.0B ± 0% ~ (all equal)
AddMap-2 32.0B ± 0% 32.0B ± 0% ~ (all equal)
AddFunc 224B ± 0% 224B ± 0% ~ (all equal)
AddFunc-2 224B ± 0% 224B ± 0% ~ (all equal)
AddChanBoth 16.0B ± 0% 16.0B ± 0% ~ (all equal)
AddChanBoth-2 16.0B ± 0% 16.0B ± 0% ~ (all equal)
AddChanRecv 16.0B ± 0% 16.0B ± 0% ~ (all equal)
AddChanRecv-2 16.0B ± 0% 16.0B ± 0% ~ (all equal)
AddChanSend 16.0B ± 0% 16.0B ± 0% ~ (all equal)
AddChanSend-2 16.0B ± 0% 16.0B ± 0% ~ (all equal)
AddStruct 5.76kB ± 0% 5.76kB ± 0% ~ (all equal)
AddStruct-2 5.76kB ± 0% 5.76kB ± 0% ~ (all equal)
AddStructPtr 5.52kB ± 0% 5.52kB ± 0% ~ (all equal)
AddStructPtr-2 5.52kB ± 0% 5.52kB ± 0% ~ (all equal)
AddSlice 16.0B ± 0% 16.0B ± 0% ~ (all equal)
AddSlice-2 16.0B ± 0% 16.0B ± 0% ~ (all equal)
AddInterface 16.0B ± 0% 16.0B ± 0% ~ (all equal)
AddInterface-2 16.0B ± 0% 16.0B ± 0% ~ (all equal)
AddInterfacePtr 16.0B ± 0% 16.0B ± 0% ~ (all equal)
AddInterfacePtr-2 16.0B ± 0% 16.0B ± 0% ~ (all equal)
Build 30.1kB ± 3% 30.4kB ± 1% ~ (p=0.841 n=5+5)
Build-2 30.1kB ± 1% 30.1kB ± 1% ~ (p=1.000 n=5+5)
BuildNonPtr 30.4kB ± 2% 30.2kB ± 2% ~ (p=0.310 n=5+5)
BuildNonPtr-2 30.4kB ± 1% 30.2kB ± 1% ~ (p=0.056 n=5+5)
Definition 0.00B 0.00B ~ (all equal)
Definition-2 0.00B 0.00B ~ (all equal)
pkg:github.com/goldeneggg/structil/dynamicstruct/decoder goos:linux goarch:amd64
DynamicStructSingleJSON 7.53kB ± 0% 7.49kB ± 0% -0.53% (p=0.008 n=5+5)
DynamicStructSingleJSON-2 7.54kB ± 0% 7.50kB ± 0% -0.54% (p=0.008 n=5+5)
DynamicStructArrayJSON 10.0kB ± 0% 10.0kB ± 0% -0.40% (p=0.008 n=5+5)
DynamicStructArrayJSON-2 10.0kB ± 0% 10.0kB ± 0% -0.38% (p=0.008 n=5+5)
DynamicStructSingleYAML 19.8kB ± 0% 19.8kB ± 0% -0.04% (p=0.008 n=5+5)
DynamicStructSingleYAML-2 19.9kB ± 0% 19.9kB ± 0% ~ (p=0.651 n=5+5)
DynamicStructArrayYAML 30.7kB ± 0% 30.7kB ± 0% -0.03% (p=0.008 n=5+5)
DynamicStructArrayYAML-2 30.7kB ± 0% 30.8kB ± 0% ~ (p=0.690 n=5+5)
pkg:github.com/goldeneggg/structil/util goos:linux goarch:amd64
ToI_String 0.00B 0.00B ~ (all equal)
ToI_String-2 0.00B 0.00B ~ (all equal)
ToI_Int 0.00B 0.00B ~ (all equal)
ToI_Int-2 0.00B 0.00B ~ (all equal)
ToI_StructPtr 0.00B 0.00B ~ (all equal)
ToI_StructPtr-2 0.00B 0.00B ~ (all equal)
ToI_Map 0.00B 0.00B ~ (all equal)
ToI_Map-2 0.00B 0.00B ~ (all equal)
ToI_Func 0.00B 0.00B ~ (all equal)
ToI_Func-2 0.00B 0.00B ~ (all equal)
ToI_Chan 0.00B 0.00B ~ (all equal)
ToI_Chan-2 0.00B 0.00B ~ (all equal)
ToI_Nil 0.00B 0.00B ~ (all equal)
ToI_Nil-2 0.00B 0.00B ~ (all equal)
ElemTypeOf_String 7.00B ± 0% 7.00B ± 0% ~ (all equal)
ElemTypeOf_String-2 7.00B ± 0% 7.00B ± 0% ~ (all equal)
ElemTypeOf_Int 7.00B ± 0% 7.00B ± 0% ~ (all equal)
ElemTypeOf_Int-2 7.00B ± 0% 7.00B ± 0% ~ (all equal)
ElemTypeOf_StructPtr 7.00B ± 0% 7.00B ± 0% ~ (all equal)
ElemTypeOf_StructPtr-2 7.00B ± 0% 7.00B ± 0% ~ (all equal)
ElemTypeOf_Map 7.00B ± 0% 7.00B ± 0% ~ (all equal)
ElemTypeOf_Map-2 7.00B ± 0% 7.00B ± 0% ~ (all equal)
ElemTypeOf_Func 7.00B ± 0% 7.00B ± 0% ~ (all equal)
ElemTypeOf_Func-2 7.00B ± 0% 7.00B ± 0% ~ (all equal)
ElemTypeOf_Chan 7.00B ± 0% 7.00B ± 0% ~ (all equal)
ElemTypeOf_Chan-2 7.00B ± 0% 7.00B ± 0% ~ (all equal)
ElemTypeOf_Error 7.00B ± 0% 7.00B ± 0% ~ (all equal)
ElemTypeOf_Error-2 7.00B ± 0% 7.00B ± 0% ~ (all equal)
ElemTypeOf_Nil 7.00B ± 0% 7.00B ± 0% ~ (all equal)
ElemTypeOf_Nil-2 7.00B ± 0% 7.00B ± 0% ~ (all equal)
RecoverToError 6.59kB ± 0% 6.59kB ± 0% ~ (all equal)
RecoverToError-2 6.59kB ± 0% 6.59kB ± 0% ~ (all equal)
name old allocs/op new allocs/op delta
pkg:github.com/goldeneggg/structil goos:linux goarch:amd64
NewGetter_Val 8.00 ± 0% 8.00 ± 0% ~ (all equal)
NewGetter_Val-2 8.00 ± 0% 8.00 ± 0% ~ (all equal)
NewGetter_Ptr 7.00 ± 0% 7.00 ± 0% ~ (all equal)
NewGetter_Ptr-2 7.00 ± 0% 7.00 ± 0% ~ (all equal)
GetterGetType_String 0.00 0.00 ~ (all equal)
GetterGetType_String-2 0.00 0.00 ~ (all equal)
GetterGetValue_String 0.00 0.00 ~ (all equal)
GetterGetValue_String-2 0.00 0.00 ~ (all equal)
GetterHas_String 0.00 0.00 ~ (all equal)
GetterHas_String-2 0.00 0.00 ~ (all equal)
GetterGet_String 0.00 0.00 ~ (all equal)
GetterGet_String-2 0.00 0.00 ~ (all equal)
GetterString 0.00 0.00 ~ (all equal)
GetterString-2 0.00 0.00 ~ (all equal)
GetterUintptr 0.00 0.00 ~ (all equal)
GetterUintptr-2 0.00 0.00 ~ (all equal)
GetterUnsafePointer 0.00 0.00 ~ (all equal)
GetterUnsafePointer-2 0.00 0.00 ~ (all equal)
GetterIsStruct 0.00 0.00 ~ (all equal)
GetterIsStruct-2 0.00 0.00 ~ (all equal)
GetterIsSlice_Bytes 0.00 0.00 ~ (all equal)
GetterIsSlice_Bytes-2 0.00 0.00 ~ (all equal)
GetterIsSlice_StructSlice 0.00 0.00 ~ (all equal)
GetterIsSlice_StructSlice-2 0.00 0.00 ~ (all equal)
GetterIsSlice_StructPtrSlice 0.00 0.00 ~ (all equal)
GetterIsSlice_StructPtrSlice-2 0.00 0.00 ~ (all equal)
GetterMapGet 37.0 ± 0% 37.0 ± 0% ~ (all equal)
GetterMapGet-2 37.0 ± 0% 37.0 ± 0% ~ (all equal)
NewFinder_Val 13.0 ± 0% 13.0 ± 0% ~ (all equal)
NewFinder_Val-2 13.0 ± 0% 13.0 ± 0% ~ (all equal)
NewFinder_Ptr 12.0 ± 0% 12.0 ± 0% ~ (all equal)
NewFinder_Ptr-2 12.0 ± 0% 12.0 ± 0% ~ (all equal)
ToMap_1FindOnly 3.00 ± 0% 3.00 ± 0% ~ (all equal)
ToMap_1FindOnly-2 3.00 ± 0% 3.00 ± 0% ~ (all equal)
ToMap_2FindOnly 3.00 ± 0% 3.00 ± 0% ~ (all equal)
ToMap_2FindOnly-2 3.00 ± 0% 3.00 ± 0% ~ (all equal)
ToMap_1Struct_1Find 4.00 ± 0% 4.00 ± 0% ~ (all equal)
ToMap_1Struct_1Find-2 4.00 ± 0% 4.00 ± 0% ~ (all equal)
ToMap_1Struct_1Find_2Pair 6.00 ± 0% 6.00 ± 0% ~ (all equal)
ToMap_1Struct_1Find_2Pair-2 6.00 ± 0% 6.00 ± 0% ~ (all equal)
ToMap_2Struct_1Find 5.00 ± 0% 5.00 ± 0% ~ (all equal)
ToMap_2Struct_1Find-2 5.00 ± 0% 5.00 ± 0% ~ (all equal)
ToMap_2Struct_2Find 6.00 ± 0% 6.00 ± 0% ~ (all equal)
ToMap_2Struct_2Find-2 6.00 ± 0% 6.00 ± 0% ~ (all equal)
NewFinderKeys_yml 351 ± 0% 351 ± 0% ~ (all equal)
NewFinderKeys_yml-2 351 ± 0% 351 ± 0% ~ (all equal)
NewFinderKeys_json 200 ± 0% 200 ± 0% ~ (all equal)
NewFinderKeys_json-2 200 ± 0% 200 ± 0% ~ (all equal)
pkg:github.com/goldeneggg/structil/dynamicstruct goos:linux goarch:amd64
AddString 1.00 ± 0% 1.00 ± 0% ~ (all equal)
AddString-2 1.00 ± 0% 1.00 ± 0% ~ (all equal)
AddStringWithTag 1.00 ± 0% 1.00 ± 0% ~ (all equal)
AddStringWithTag-2 1.00 ± 0% 1.00 ± 0% ~ (all equal)
AddInt 1.00 ± 0% 1.00 ± 0% ~ (all equal)
AddInt-2 1.00 ± 0% 1.00 ± 0% ~ (all equal)
AddFloa32 1.00 ± 0% 1.00 ± 0% ~ (all equal)
AddFloa32-2 1.00 ± 0% 1.00 ± 0% ~ (all equal)
AddFloa64 1.00 ± 0% 1.00 ± 0% ~ (all equal)
AddFloa64-2 1.00 ± 0% 1.00 ± 0% ~ (all equal)
AddBool 1.00 ± 0% 1.00 ± 0% ~ (all equal)
AddBool-2 1.00 ± 0% 1.00 ± 0% ~ (all equal)
AddMap 2.00 ± 0% 2.00 ± 0% ~ (all equal)
AddMap-2 2.00 ± 0% 2.00 ± 0% ~ (all equal)
AddFunc 5.00 ± 0% 5.00 ± 0% ~ (all equal)
AddFunc-2 5.00 ± 0% 5.00 ± 0% ~ (all equal)
AddChanBoth 1.00 ± 0% 1.00 ± 0% ~ (all equal)
AddChanBoth-2 1.00 ± 0% 1.00 ± 0% ~ (all equal)
AddChanRecv 1.00 ± 0% 1.00 ± 0% ~ (all equal)
AddChanRecv-2 1.00 ± 0% 1.00 ± 0% ~ (all equal)
AddChanSend 1.00 ± 0% 1.00 ± 0% ~ (all equal)
AddChanSend-2 1.00 ± 0% 1.00 ± 0% ~ (all equal)
AddStruct 51.0 ± 0% 51.0 ± 0% ~ (all equal)
AddStruct-2 51.0 ± 0% 51.0 ± 0% ~ (all equal)
AddStructPtr 50.0 ± 0% 50.0 ± 0% ~ (all equal)
AddStructPtr-2 50.0 ± 0% 50.0 ± 0% ~ (all equal)
AddSlice 1.00 ± 0% 1.00 ± 0% ~ (all equal)
AddSlice-2 1.00 ± 0% 1.00 ± 0% ~ (all equal)
AddInterface 1.00 ± 0% 1.00 ± 0% ~ (all equal)
AddInterface-2 1.00 ± 0% 1.00 ± 0% ~ (all equal)
AddInterfacePtr 1.00 ± 0% 1.00 ± 0% ~ (all equal)
AddInterfacePtr-2 1.00 ± 0% 1.00 ± 0% ~ (all equal)
Build 91.0 ± 0% 91.0 ± 0% ~ (all equal)
Build-2 90.6 ± 1% 91.0 ± 0% ~ (p=0.556 n=5+4)
BuildNonPtr 91.0 ± 0% 90.0 ± 0% -1.10% (p=0.029 n=4+4)
BuildNonPtr-2 91.0 ± 0% 90.6 ± 1% ~ (p=0.333 n=4+5)
Definition 0.00 0.00 ~ (all equal)
Definition-2 0.00 0.00 ~ (all equal)
pkg:github.com/goldeneggg/structil/dynamicstruct/decoder goos:linux goarch:amd64
DynamicStructSingleJSON 330 ± 0% 330 ± 0% ~ (all equal)
DynamicStructSingleJSON-2 330 ± 0% 330 ± 0% ~ (all equal)
DynamicStructArrayJSON 392 ± 0% 392 ± 0% ~ (all equal)
DynamicStructArrayJSON-2 392 ± 0% 392 ± 0% ~ (all equal)
DynamicStructSingleYAML 530 ± 0% 530 ± 0% ~ (all equal)
DynamicStructSingleYAML-2 530 ± 0% 530 ± 0% ~ (all equal)
DynamicStructArrayYAML 762 ± 0% 762 ± 0% ~ (all equal)
DynamicStructArrayYAML-2 762 ± 0% 762 ± 0% ~ (all equal)
pkg:github.com/goldeneggg/structil/util goos:linux goarch:amd64
ToI_String 0.00 0.00 ~ (all equal)
ToI_String-2 0.00 0.00 ~ (all equal)
ToI_Int 0.00 0.00 ~ (all equal)
ToI_Int-2 0.00 0.00 ~ (all equal)
ToI_StructPtr 0.00 0.00 ~ (all equal)
ToI_StructPtr-2 0.00 0.00 ~ (all equal)
ToI_Map 0.00 0.00 ~ (all equal)
ToI_Map-2 0.00 0.00 ~ (all equal)
ToI_Func 0.00 0.00 ~ (all equal)
ToI_Func-2 0.00 0.00 ~ (all equal)
ToI_Chan 0.00 0.00 ~ (all equal)
ToI_Chan-2 0.00 0.00 ~ (all equal)
ToI_Nil 0.00 0.00 ~ (all equal)
ToI_Nil-2 0.00 0.00 ~ (all equal)
ElemTypeOf_String 0.00 0.00 ~ (all equal)
ElemTypeOf_String-2 0.00 0.00 ~ (all equal)
ElemTypeOf_Int 0.00 0.00 ~ (all equal)
ElemTypeOf_Int-2 0.00 0.00 ~ (all equal)
ElemTypeOf_StructPtr 0.00 0.00 ~ (all equal)
ElemTypeOf_StructPtr-2 0.00 0.00 ~ (all equal)
ElemTypeOf_Map 0.00 0.00 ~ (all equal)
ElemTypeOf_Map-2 0.00 0.00 ~ (all equal)
ElemTypeOf_Func 0.00 0.00 ~ (all equal)
ElemTypeOf_Func-2 0.00 0.00 ~ (all equal)
ElemTypeOf_Chan 0.00 0.00 ~ (all equal)
ElemTypeOf_Chan-2 0.00 0.00 ~ (all equal)
ElemTypeOf_Error 0.00 0.00 ~ (all equal)
ElemTypeOf_Error-2 0.00 0.00 ~ (all equal)
ElemTypeOf_Nil 0.00 0.00 ~ (all equal)
ElemTypeOf_Nil-2 0.00 0.00 ~ (all equal)
RecoverToError 55.0 ± 0% 55.0 ± 0% ~ (all equal)
RecoverToError-2 55.0 ± 0% 55.0 ± 0% ~ (all equal)
@goldeneggg
Copy link
Author

goldeneggg commented Aug 17, 2021

Original artifact is here -> https://github.com/goldeneggg/structil/actions/runs/1137721153#artifacts (benchstat-vs-latest-go-1.17)

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