Skip to content

Add support for MASL spec#21

Merged
makew0rld merged 4 commits intomainfrom
feat/masl
Oct 7, 2025
Merged

Add support for MASL spec#21
makew0rld merged 4 commits intomainfrom
feat/masl

Conversation

@fastfadingviolets
Copy link
Copy Markdown
Collaborator

No description provided.

@github-actions

This comment was marked as off-topic.

Copy link
Copy Markdown
Contributor

@makew0rld makew0rld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll wait until this PR is ready to do an in depth review, but if it's possible I think it would be a lot more idiomatic to have Document and Resource made up of public fields (with cbor struct tags). That way the developer can read and write data as they need easily. Functions like GetAttribute and SetAttribute could be removed in lieu of builtin map functionality. Functions that do something more advanced could remain.

Ideally one struct would be able represent both single file and multi file documents under this scheme, although I'm not sure how that would look. Maybe just some unused fields in either case?

Comment thread masl/masl.go Outdated
Comment thread masl/masl.go Outdated
Comment thread masl/masl.go Outdated
Comment thread masl/masl.go Outdated
@fastfadingviolets fastfadingviolets force-pushed the feat/masl branch 2 times, most recently from a1c6f71 to 53995d5 Compare September 11, 2025 18:06
@makew0rld
Copy link
Copy Markdown
Contributor

Ahead of my review: the micro-benchmarks seem to indicate some large performance regressions when marshalling structs, please investigate that if you can. I can also look into it later on.

@makew0rld makew0rld marked this pull request as ready for review September 11, 2025 21:28
Copy link
Copy Markdown
Contributor

@makew0rld makew0rld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comments below. Note CI tests are failing.

Comment thread go.mod Outdated
Comment thread masl/example_test.go Outdated
Comment thread masl/masl.go Outdated
Comment thread masl/masl.go
Comment thread masl/validation_test.go Outdated
Comment thread masl/masl.go Outdated
Comment thread masl/masl.go Outdated
@fastfadingviolets fastfadingviolets marked this pull request as ready for review September 30, 2025 18:17
@fastfadingviolets fastfadingviolets changed the title wip masl implementation Add support for MASL spec Sep 30, 2025
Copy link
Copy Markdown
Contributor

@makew0rld makew0rld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, although let's merge the other PR first since this one relies on that.

@makew0rld makew0rld merged commit ecbf9c5 into main Oct 7, 2025
9 checks passed
@makew0rld makew0rld deleted the feat/masl branch October 7, 2025 20:48
@makew0rld makew0rld mentioned this pull request Oct 7, 2025
Closed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Oct 7, 2025

Benchmark Results

Performance Regression Analysis

goos: linux
goarch: amd64
pkg: github.com/hyphacoop/go-dasl/drisl
cpu: AMD EPYC 7763 64-Core Processor                
                                                                       │ bench-base.txt │          bench-current.txt           │
                                                                       │     sec/op     │    sec/op     vs base                │
MarshalTwitter-4                                                           3.130m ±  1%    3.101m ± 0%   -0.90% (p=0.001 n=20)
UnmarshalTwitter-4                                                         4.850m ±  0%    4.804m ± 1%   -0.96% (p=0.003 n=20)
MarshalTwitterCid-4                                                        3.211m ±  0%    3.185m ± 0%   -0.82% (p=0.000 n=20)
UnmarshalTwitterCid-4                                                      5.042m ±  0%    4.959m ± 1%   -1.63% (p=0.000 n=20)
Unmarshal/CBOR_bool_to_Go_interface_{}-4                                   145.5n ±  0%    136.5n ± 0%   -6.15% (p=0.000 n=20)
Unmarshal/CBOR_bool_to_Go_bool-4                                          111.70n ±  0%    96.15n ± 0%  -13.93% (p=0.000 n=20)
Unmarshal/CBOR_positive_int_to_Go_interface_{}-4                           166.7n ±  0%    159.9n ± 0%   -4.11% (p=0.000 n=20)
Unmarshal/CBOR_positive_int_to_Go_uint64-4                                 121.3n ±  0%    117.5n ± 0%   -3.13% (p=0.000 n=20)
Unmarshal/CBOR_negative_int_to_Go_interface_{}-4                           162.1n ±  0%    155.6n ± 0%   -4.01% (p=0.000 n=20)
Unmarshal/CBOR_negative_int_to_Go_int64-4                                  122.9n ±  0%    102.7n ± 0%  -16.48% (p=0.000 n=20)
Unmarshal/CBOR_float_to_Go_interface_{}-4                                  163.5n ±  0%    165.8n ± 0%   +1.38% (p=0.000 n=20)
Unmarshal/CBOR_float_to_Go_float64-4                                       131.2n ±  0%    117.0n ± 0%  -10.82% (p=0.000 n=20)
Unmarshal/CBOR_bytes_to_Go_interface_{}-4                                  233.8n ±  0%    213.7n ± 0%   -8.60% (p=0.000 n=20)
Unmarshal/CBOR_bytes_to_Go_[]uint8-4                                       220.8n ±  0%    213.2n ± 0%   -3.44% (p=0.000 n=20)
Unmarshal/CBOR_text_to_Go_interface_{}-4                                   232.4n ±  1%    206.0n ± 0%  -11.34% (p=0.000 n=20)
Unmarshal/CBOR_text_to_Go_string-4                                         189.2n ±  0%    180.3n ± 0%   -4.70% (p=0.000 n=20)
Unmarshal/CBOR_array_to_Go_interface_{}-4                                  1.125µ ±  0%    1.106µ ± 1%   -1.69% (p=0.000 n=20)
Unmarshal/CBOR_array_to_Go_[]int-4                                         1.583µ ±  0%    1.562µ ± 0%   -1.33% (p=0.000 n=20)
Unmarshal/CBOR_map_to_Go_interface_{}-4                                    3.621µ ±  0%    3.619µ ± 0%        ~ (p=0.634 n=20)
Unmarshal/CBOR_map_to_Go_map[string]interface_{}-4                         3.489µ ±  0%    3.481µ ± 0%   -0.23% (p=0.000 n=20)
Unmarshal/CBOR_map_to_Go_map[string]string-4                               2.899µ ±  0%    2.684µ ± 0%   -7.42% (p=0.000 n=20)
Unmarshal/CBOR_cid_to_Go_struct-4                                          626.5n ±  0%    607.3n ± 0%   -3.05% (p=0.000 n=20)
Unmarshal/CBOR_map_to_Go_map[string]interface{}-4                          6.774µ ±  0%    6.658µ ± 0%   -1.72% (p=0.000 n=20)
Unmarshal/CBOR_map_to_Go_struct-4                                          4.750µ ±  0%    4.539µ ± 4%   -4.46% (p=0.000 n=20)
Unmarshal/CBOR_array_to_Go_[]interface{}-4                                 5.820µ ±  0%    5.746µ ± 0%   -1.27% (p=0.000 n=20)
Unmarshal/CBOR_array_to_Go_struct_toarray-4                                5.266µ ±  0%    4.948µ ± 0%   -6.04% (p=0.000 n=20)
Marshal/Go_bool_to_CBOR_bool-4                                             64.33n ±  0%    65.36n ± 0%   +1.61% (p=0.000 n=20)
Marshal/Go_uint64_to_CBOR_positive_int-4                                   76.24n ±  0%    76.38n ± 1%        ~ (p=0.203 n=20)
Marshal/Go_int64_to_CBOR_negative_int-4                                    71.24n ±  0%    72.63n ± 0%   +1.96% (p=0.000 n=20)
Marshal/Go_float64_to_CBOR_float-4                                         85.35n ±  0%    76.82n ± 0%  -10.00% (p=0.000 n=20)
Marshal/Go_float32_to_CBOR_float-4                                         85.68n ±  0%    79.47n ± 0%   -7.25% (p=0.000 n=20)
Marshal/Go_[]uint8_to_CBOR_bytes-4                                         97.87n ±  0%   109.40n ± 0%  +11.79% (p=0.000 n=20)
Marshal/Go_string_to_CBOR_text-4                                           91.39n ±  0%    91.68n ± 0%   +0.31% (p=0.023 n=20)
Marshal/Go_[]int_to_CBOR_array-4                                           683.1n ±  0%    671.5n ± 0%   -1.70% (p=0.000 n=20)
Marshal/Go_map[string]string_to_CBOR_map-4                                 1.853µ ±  0%    1.856µ ± 0%        ~ (p=0.054 n=20)
Marshal/Go_struct_to_CBOR_cid-4                                            291.6n ±  0%    293.6n ± 0%   +0.67% (p=0.000 n=20)
Marshal/Go_map[string]interface{}_to_CBOR_map-4                            3.975µ ±  0%    3.936µ ± 0%   -0.99% (p=0.000 n=20)
Marshal/Go_struct_to_CBOR_map-4                                            2.869µ ±  0%    2.879µ ± 0%   +0.37% (p=0.008 n=20)
Marshal/Go_struct_many_fields_all_omitempty_all_empty_to_CBOR_map-4        338.0n ±  3%    390.6n ± 0%  +15.55% (p=0.000 n=20)
Marshal/Go_struct_some_fields_all_omitempty_all_empty_to_CBOR_map-4        142.0n ±  1%    155.9n ± 0%   +9.79% (p=0.000 n=20)
Marshal/Go_struct_many_fields_all_omitempty_all_nonempty_to_CBOR_map-4     1.151µ ±  0%    1.206µ ± 0%   +4.82% (p=0.000 n=20)
Marshal/Go_struct_some_fields_all_omitempty_all_nonempty_to_CBOR_map-4     367.4n ± 13%    382.1n ± 0%        ~ (p=0.560 n=20)
Marshal/Go_struct_many_fields_one_omitempty_to_CBOR_map-4                  1.058µ ±  0%    1.118µ ± 0%   +5.67% (p=0.000 n=20)
Marshal/Go_struct_some_fields_one_omitempty_to_CBOR_map-4                  336.5n ±  4%    345.3n ± 0%        ~ (p=0.129 n=20)
Marshal/Go_[]interface{}_to_CBOR_map-4                                     2.985µ ±  0%    2.972µ ± 0%   -0.44% (p=0.000 n=20)
Marshal/Go_struct_toarray_to_CBOR_array-4                                  2.790µ ±  0%    2.762µ ± 0%   -0.99% (p=0.000 n=20)
UnmarshalMapToStruct/default_options/all_known_fields-4                    1.356µ ±  0%    1.357µ ± 0%        ~ (p=0.279 n=20)
UnmarshalMapToStruct/default_options/all_unknown_fields-4                  2.829µ ±  0%    2.899µ ± 0%   +2.46% (p=0.000 n=20)
UnmarshalMapToStruct/default_options/many_fields_one_key_per_field-4       10.10µ ±  0%    10.38µ ± 0%   +2.83% (p=0.000 n=20)
geomean                                                                    1.143µ          1.124µ        -1.67%

                                                                       │ bench-base.txt │          bench-current.txt           │
                                                                       │      B/s       │     B/s       vs base                │
MarshalTwitter-4                                                          126.6Mi ±  1%   127.8Mi ± 0%   +0.91% (p=0.001 n=20)
UnmarshalTwitter-4                                                        81.71Mi ±  0%   82.51Mi ± 1%   +0.97% (p=0.003 n=20)
MarshalTwitterCid-4                                                       124.8Mi ±  0%   125.8Mi ± 0%   +0.83% (p=0.000 n=20)
UnmarshalTwitterCid-4                                                     79.46Mi ±  0%   80.78Mi ± 1%   +1.66% (p=0.000 n=20)
Unmarshal/CBOR_bool_to_Go_interface_{}-4                                  6.557Mi ±  0%   6.986Mi ± 0%   +6.55% (p=0.000 n=20)
Unmarshal/CBOR_bool_to_Go_bool-4                                          8.535Mi ±  0%   9.918Mi ± 0%  +16.20% (p=0.000 n=20)
Unmarshal/CBOR_positive_int_to_Go_interface_{}-4                          51.48Mi ±  0%   53.70Mi ± 0%   +4.31% (p=0.000 n=20)
Unmarshal/CBOR_positive_int_to_Go_uint64-4                                70.76Mi ±  0%   73.03Mi ± 0%   +3.21% (p=0.000 n=20)
Unmarshal/CBOR_negative_int_to_Go_interface_{}-4                          17.65Mi ±  0%   18.39Mi ± 0%   +4.19% (p=0.000 n=20)
Unmarshal/CBOR_negative_int_to_Go_int64-4                                 23.27Mi ±  0%   27.87Mi ± 0%  +19.75% (p=0.000 n=20)
Unmarshal/CBOR_float_to_Go_interface_{}-4                                 52.48Mi ±  0%   51.77Mi ± 0%   -1.34% (p=0.000 n=20)
Unmarshal/CBOR_float_to_Go_float64-4                                      65.40Mi ±  0%   73.37Mi ± 0%  +12.18% (p=0.000 n=20)
Unmarshal/CBOR_bytes_to_Go_interface_{}-4                                 114.2Mi ±  0%   125.0Mi ± 0%   +9.40% (p=0.000 n=20)
Unmarshal/CBOR_bytes_to_Go_[]uint8-4                                      120.9Mi ±  0%   125.2Mi ± 0%   +3.56% (p=0.000 n=20)
Unmarshal/CBOR_text_to_Go_interface_{}-4                                  184.7Mi ±  1%   208.3Mi ± 0%  +12.80% (p=0.000 n=20)
Unmarshal/CBOR_text_to_Go_string-4                                        226.8Mi ±  0%   238.0Mi ± 0%   +4.95% (p=0.000 n=20)
Unmarshal/CBOR_array_to_Go_interface_{}-4                                 26.29Mi ±  0%   26.73Mi ± 1%   +1.67% (p=0.000 n=20)
Unmarshal/CBOR_array_to_Go_[]int-4                                        18.68Mi ±  0%   18.93Mi ± 0%   +1.33% (p=0.000 n=20)
Unmarshal/CBOR_map_to_Go_interface_{}-4                                   13.96Mi ±  0%   13.97Mi ± 0%        ~ (p=0.624 n=20)
Unmarshal/CBOR_map_to_Go_map[string]interface_{}-4                        14.49Mi ±  0%   14.52Mi ± 0%   +0.26% (p=0.000 n=20)
Unmarshal/CBOR_map_to_Go_map[string]string-4                              17.43Mi ±  0%   18.83Mi ± 0%   +7.99% (p=0.000 n=20)
Unmarshal/CBOR_cid_to_Go_struct-4                                         62.42Mi ±  0%   64.38Mi ± 0%   +3.14% (p=0.000 n=20)
Unmarshal/CBOR_map_to_Go_map[string]interface{}-4                         26.89Mi ±  0%   27.36Mi ± 0%   +1.76% (p=0.000 n=20)
Unmarshal/CBOR_map_to_Go_struct-4                                         39.54Mi ±  0%   41.39Mi ± 4%   +4.68% (p=0.000 n=20)
Unmarshal/CBOR_array_to_Go_[]interface{}-4                                29.50Mi ±  0%   29.88Mi ± 0%   +1.29% (p=0.000 n=20)
Unmarshal/CBOR_array_to_Go_struct_toarray-4                               32.60Mi ±  0%   34.69Mi ± 0%   +6.42% (p=0.000 n=20)
Marshal/Go_bool_to_CBOR_bool-4                                            14.82Mi ±  0%   14.59Mi ± 0%   -1.58% (p=0.000 n=20)
Marshal/Go_uint64_to_CBOR_positive_int-4                                  112.6Mi ±  0%   112.4Mi ± 1%        ~ (p=0.189 n=20)
Marshal/Go_int64_to_CBOR_negative_int-4                                   40.16Mi ±  0%   39.39Mi ± 0%   -1.91% (p=0.000 n=20)
Marshal/Go_float64_to_CBOR_float-4                                        100.6Mi ±  0%   111.7Mi ± 0%  +11.11% (p=0.000 n=20)
Marshal/Go_float32_to_CBOR_float-4                                        100.2Mi ±  0%   108.0Mi ± 0%   +7.83% (p=0.000 n=20)
Marshal/Go_[]uint8_to_CBOR_bytes-4                                        272.8Mi ±  0%   244.0Mi ± 0%  -10.57% (p=0.000 n=20)
Marshal/Go_string_to_CBOR_text-4                                          469.6Mi ±  0%   468.1Mi ± 0%   -0.31% (p=0.020 n=20)
Marshal/Go_[]int_to_CBOR_array-4                                          43.28Mi ±  0%   44.03Mi ± 0%   +1.72% (p=0.000 n=20)
Marshal/Go_map[string]string_to_CBOR_map-4                                27.29Mi ±  0%   27.24Mi ± 0%        ~ (p=0.055 n=20)
Marshal/Go_struct_to_CBOR_cid-4                                           130.8Mi ±  0%   129.9Mi ± 0%   -0.67% (p=0.000 n=20)
Marshal/Go_map[string]interface{}_to_CBOR_map-4                           48.47Mi ±  0%   48.95Mi ± 0%   +1.00% (p=0.000 n=20)
Marshal/Go_struct_to_CBOR_map-4                                           67.15Mi ±  0%   66.91Mi ± 0%   -0.36% (p=0.007 n=20)
Marshal/Go_struct_many_fields_all_omitempty_all_empty_to_CBOR_map-4       2.823Mi ±  3%   2.441Mi ± 0%  -13.51% (p=0.000 n=20)
Marshal/Go_struct_some_fields_all_omitempty_all_empty_to_CBOR_map-4       6.719Mi ±  1%   6.118Mi ± 0%   -8.94% (p=0.000 n=20)
Marshal/Go_struct_many_fields_all_omitempty_all_nonempty_to_CBOR_map-4    134.3Mi ±  0%   128.1Mi ± 0%   -4.58% (p=0.000 n=20)
Marshal/Go_struct_some_fields_all_omitempty_all_nonempty_to_CBOR_map-4    106.4Mi ± 11%   102.3Mi ± 0%        ~ (p=0.560 n=20)
Marshal/Go_struct_many_fields_one_omitempty_to_CBOR_map-4                 141.5Mi ±  0%   133.9Mi ± 0%   -5.37% (p=0.000 n=20)
Marshal/Go_struct_some_fields_one_omitempty_to_CBOR_map-4                102.03Mi ±  4%   99.43Mi ± 0%        ~ (p=0.126 n=20)
Marshal/Go_[]interface{}_to_CBOR_map-4                                    57.51Mi ±  0%   57.76Mi ± 0%   +0.45% (p=0.000 n=20)
Marshal/Go_struct_toarray_to_CBOR_array-4                                 61.54Mi ±  0%   62.16Mi ± 0%   +1.02% (p=0.000 n=20)
UnmarshalMapToStruct/default_options/all_known_fields-4                   28.12Mi ±  0%   28.12Mi ± 0%        ~ (p=0.329 n=20)
UnmarshalMapToStruct/default_options/all_unknown_fields-4                 13.48Mi ±  0%   13.16Mi ± 0%   -2.40% (p=0.000 n=20)
UnmarshalMapToStruct/default_options/many_fields_one_key_per_field-4      39.48Mi ±  0%   38.39Mi ± 0%   -2.75% (p=0.000 n=20)
geomean                                                                   47.66Mi         48.47Mi        +1.70%

                                                                       │ bench-base.txt │           bench-current.txt           │
                                                                       │      B/op      │     B/op      vs base                 │
MarshalTwitter-4                                                         463.4Ki ± 0%     464.1Ki ± 0%       ~ (p=0.534 n=20)
UnmarshalTwitter-4                                                       1.470Mi ± 0%     1.470Mi ± 0%       ~ (p=0.701 n=20)
MarshalTwitterCid-4                                                      480.0Ki ± 0%     480.8Ki ± 0%       ~ (p=0.445 n=20)
UnmarshalTwitterCid-4                                                    1.494Mi ± 0%     1.494Mi ± 0%       ~ (p=0.592 n=20)
Unmarshal/CBOR_bool_to_Go_interface_{}-4                                   16.00 ± 0%       16.00 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_bool_to_Go_bool-4                                           1.000 ± 0%       1.000 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_positive_int_to_Go_interface_{}-4                           24.00 ± 0%       24.00 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_positive_int_to_Go_uint64-4                                 8.000 ± 0%       8.000 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_negative_int_to_Go_interface_{}-4                           24.00 ± 0%       24.00 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_negative_int_to_Go_int64-4                                  8.000 ± 0%       8.000 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_float_to_Go_interface_{}-4                                  24.00 ± 0%       24.00 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_float_to_Go_float64-4                                       8.000 ± 0%       8.000 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_bytes_to_Go_interface_{}-4                                  72.00 ± 0%       72.00 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_bytes_to_Go_[]uint8-4                                       56.00 ± 0%       56.00 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_text_to_Go_interface_{}-4                                   80.00 ± 0%       80.00 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_text_to_Go_string-4                                         64.00 ± 0%       64.00 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_array_to_Go_interface_{}-4                                  456.0 ± 0%       456.0 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_array_to_Go_[]int-4                                         256.0 ± 0%       256.0 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_map_to_Go_interface_{}-4                                    928.0 ± 0%       928.0 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_map_to_Go_map[string]interface_{}-4                         912.0 ± 0%       912.0 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_map_to_Go_map[string]string-4                               704.0 ± 0%       704.0 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_cid_to_Go_struct-4                                          192.0 ± 0%       192.0 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_map_to_Go_map[string]interface{}-4                        1.836Ki ± 0%     1.836Ki ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_map_to_Go_struct-4                                        1.141Ki ± 0%     1.141Ki ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_array_to_Go_[]interface{}-4                               1.633Ki ± 0%     1.633Ki ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_array_to_Go_struct_toarray-4                              1.094Ki ± 0%     1.094Ki ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_bool_to_CBOR_bool-4                                             1.000 ± 0%       1.000 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_uint64_to_CBOR_positive_int-4                                   16.00 ± 0%       16.00 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_int64_to_CBOR_negative_int-4                                    3.000 ± 0%       3.000 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_float64_to_CBOR_float-4                                         16.00 ± 0%       16.00 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_float32_to_CBOR_float-4                                         16.00 ± 0%       16.00 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_[]uint8_to_CBOR_bytes-4                                         32.00 ± 0%       32.00 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_string_to_CBOR_text-4                                           48.00 ± 0%       48.00 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_[]int_to_CBOR_array-4                                           32.00 ± 0%       32.00 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_map[string]string_to_CBOR_map-4                                 112.0 ± 0%       112.0 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_struct_to_CBOR_cid-4                                            120.0 ± 0%       120.0 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_map[string]interface{}_to_CBOR_map-4                            304.0 ± 1%       304.0 ± 0%       ~ (p=0.666 n=20)
Marshal/Go_struct_to_CBOR_map-4                                            256.0 ± 0%       256.0 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_struct_many_fields_all_omitempty_all_empty_to_CBOR_map-4        1.000 ± 0%       1.000 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_struct_some_fields_all_omitempty_all_empty_to_CBOR_map-4        1.000 ± 0%       1.000 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_struct_many_fields_all_omitempty_all_nonempty_to_CBOR_map-4     176.0 ± 0%       176.0 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_struct_some_fields_all_omitempty_all_nonempty_to_CBOR_map-4     48.00 ± 0%       48.00 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_struct_many_fields_one_omitempty_to_CBOR_map-4                  160.0 ± 0%       160.0 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_struct_some_fields_one_omitempty_to_CBOR_map-4                  48.00 ± 0%       48.00 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_[]interface{}_to_CBOR_map-4                                     240.0 ± 0%       240.0 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_struct_toarray_to_CBOR_array-4                                  240.0 ± 0%       240.0 ± 0%       ~ (p=1.000 n=20) ¹
UnmarshalMapToStruct/default_options/all_known_fields-4                    0.000 ± 0%       0.000 ± 0%       ~ (p=1.000 n=20) ¹
UnmarshalMapToStruct/default_options/all_unknown_fields-4                  920.0 ± 0%       920.0 ± 0%       ~ (p=1.000 n=20) ¹
UnmarshalMapToStruct/default_options/many_fields_one_key_per_field-4       0.000 ± 0%       0.000 ± 0%       ~ (p=1.000 n=20) ¹
geomean                                                                               ²                 +0.01%                ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                                                                       │ bench-base.txt │          bench-current.txt           │
                                                                       │   allocs/op    │  allocs/op   vs base                 │
MarshalTwitter-4                                                           946.0 ± 0%      945.5 ± 0%       ~ (p=0.973 n=20)
UnmarshalTwitter-4                                                        32.52k ± 0%     32.52k ± 0%       ~ (p=1.000 n=20) ¹
MarshalTwitterCid-4                                                       1.349k ± 0%     1.349k ± 0%       ~ (p=0.877 n=20)
UnmarshalTwitterCid-4                                                     33.62k ± 0%     33.62k ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_bool_to_Go_interface_{}-4                                   1.000 ± 0%      1.000 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_bool_to_Go_bool-4                                           1.000 ± 0%      1.000 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_positive_int_to_Go_interface_{}-4                           2.000 ± 0%      2.000 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_positive_int_to_Go_uint64-4                                 1.000 ± 0%      1.000 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_negative_int_to_Go_interface_{}-4                           2.000 ± 0%      2.000 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_negative_int_to_Go_int64-4                                  1.000 ± 0%      1.000 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_float_to_Go_interface_{}-4                                  2.000 ± 0%      2.000 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_float_to_Go_float64-4                                       1.000 ± 0%      1.000 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_bytes_to_Go_interface_{}-4                                  3.000 ± 0%      3.000 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_bytes_to_Go_[]uint8-4                                       2.000 ± 0%      2.000 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_text_to_Go_interface_{}-4                                   3.000 ± 0%      3.000 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_text_to_Go_string-4                                         2.000 ± 0%      2.000 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_array_to_Go_interface_{}-4                                  3.000 ± 0%      3.000 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_array_to_Go_[]int-4                                         3.000 ± 0%      3.000 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_map_to_Go_interface_{}-4                                    21.00 ± 0%      21.00 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_map_to_Go_map[string]interface_{}-4                         20.00 ± 0%      20.00 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_map_to_Go_map[string]string-4                               7.000 ± 0%      7.000 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_cid_to_Go_struct-4                                          8.000 ± 0%      8.000 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_map_to_Go_map[string]interface{}-4                          36.00 ± 0%      36.00 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_map_to_Go_struct-4                                          16.00 ± 0%      16.00 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_array_to_Go_[]interface{}-4                                 32.00 ± 0%      32.00 ± 0%       ~ (p=1.000 n=20) ¹
Unmarshal/CBOR_array_to_Go_struct_toarray-4                                11.00 ± 0%      11.00 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_bool_to_CBOR_bool-4                                             1.000 ± 0%      1.000 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_uint64_to_CBOR_positive_int-4                                   1.000 ± 0%      1.000 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_int64_to_CBOR_negative_int-4                                    1.000 ± 0%      1.000 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_float64_to_CBOR_float-4                                         1.000 ± 0%      1.000 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_float32_to_CBOR_float-4                                         1.000 ± 0%      1.000 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_[]uint8_to_CBOR_bytes-4                                         1.000 ± 0%      1.000 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_string_to_CBOR_text-4                                           1.000 ± 0%      1.000 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_[]int_to_CBOR_array-4                                           1.000 ± 0%      1.000 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_map[string]string_to_CBOR_map-4                                 2.000 ± 0%      2.000 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_struct_to_CBOR_cid-4                                            5.000 ± 0%      5.000 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_map[string]interface{}_to_CBOR_map-4                            3.000 ± 0%      3.000 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_struct_to_CBOR_map-4                                            2.000 ± 0%      2.000 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_struct_many_fields_all_omitempty_all_empty_to_CBOR_map-4        1.000 ± 0%      1.000 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_struct_some_fields_all_omitempty_all_empty_to_CBOR_map-4        1.000 ± 0%      1.000 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_struct_many_fields_all_omitempty_all_nonempty_to_CBOR_map-4     1.000 ± 0%      1.000 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_struct_some_fields_all_omitempty_all_nonempty_to_CBOR_map-4     1.000 ± 0%      1.000 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_struct_many_fields_one_omitempty_to_CBOR_map-4                  1.000 ± 0%      1.000 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_struct_some_fields_one_omitempty_to_CBOR_map-4                  1.000 ± 0%      1.000 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_[]interface{}_to_CBOR_map-4                                     2.000 ± 0%      2.000 ± 0%       ~ (p=1.000 n=20) ¹
Marshal/Go_struct_toarray_to_CBOR_array-4                                  2.000 ± 0%      2.000 ± 0%       ~ (p=1.000 n=20) ¹
UnmarshalMapToStruct/default_options/all_known_fields-4                    0.000 ± 0%      0.000 ± 0%       ~ (p=1.000 n=20) ¹
UnmarshalMapToStruct/default_options/all_unknown_fields-4                  18.00 ± 0%      18.00 ± 0%       ~ (p=1.000 n=20) ¹
UnmarshalMapToStruct/default_options/many_fields_one_key_per_field-4       0.000 ± 0%      0.000 ± 0%       ~ (p=1.000 n=20) ¹
geomean                                                                               ²                -0.00%                ²
¹ all samples are equal
² summaries must be >0 to compute geomean

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.

2 participants