A fast, safe, and efficient CBOR serialization library for Swift on any platform.
swiftpackageindex.com/thecoolwinter/CBOR/1.1.1/documentation/cbor
atproto
swift
cbor
1
2## Comparing results between 'swiftcbor' and 'Current_run'
3
4```
5Host 'Khans-MacBook-Pro.local' with 10 'arm64' processors with 16 GB memory, running:
6Darwin Kernel Version 24.3.0: Thu Jan 2 20:24:16 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6000
7```
8## Decoding
9
10### Array metrics
11
12<details><summary>Time (total CPU): results within specified thresholds, fold down for details.</summary>
13<p>
14
15| Time (total CPU) (ns) * | p0 | p25 | p50 | p75 | p90 | p99 | p100 | Samples |
16|:----------------------------------------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|
17| swiftcbor | 22 | 23 | 23 | 23 | 24 | 34 | 59 | 10000 |
18| Current_run | 6 | 7 | 7 | 7 | 7 | 7 | 24 | 10000 |
19| Δ | -16 | -16 | -16 | -16 | -17 | -27 | -35 | 0 |
20| Improvement % | 73 | 70 | 70 | 70 | 71 | 79 | 59 | 0 |
21
22<p>
23</details>
24
25### Complex Object metrics
26
27<details><summary>Time (total CPU): results within specified thresholds, fold down for details.</summary>
28<p>
29
30| Time (total CPU) (μs) * | p0 | p25 | p50 | p75 | p90 | p99 | p100 | Samples |
31|:----------------------------------------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|
32| swiftcbor | 698 | 700 | 703 | 709 | 723 | 761 | 824 | 1229 |
33| Current_run | 74 | 74 | 75 | 75 | 77 | 83 | 104 | 8115 |
34| Δ | -624 | -626 | -628 | -634 | -646 | -678 | -720 | 6886 |
35| Improvement % | 89 | 89 | 89 | 89 | 89 | 89 | 87 | 6886 |
36
37<p>
38</details>
39
40### Date metrics
41
42<details><summary>Time (total CPU): results within specified thresholds, fold down for details.</summary>
43<p>
44
45| Time (total CPU) (ns) * | p0 | p25 | p50 | p75 | p90 | p99 | p100 | Samples |
46|:----------------------------------------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|
47| swiftcbor | 5125 | 5211 | 5251 | 5291 | 5375 | 5875 | 19500 | 10000 |
48| Current_run | 959 | 1042 | 1083 | 1084 | 1125 | 1250 | 8749 | 10000 |
49| Δ | -4166 | -4169 | -4168 | -4207 | -4250 | -4625 | -10751 | 0 |
50| Improvement % | 81 | 80 | 79 | 80 | 79 | 79 | 55 | 0 |
51
52<p>
53</details>
54
55### Dictionary metrics
56
57<details><summary>Time (total CPU): results within specified thresholds, fold down for details.</summary>
58<p>
59
60| Time (total CPU) (ns) * | p0 | p25 | p50 | p75 | p90 | p99 | p100 | Samples |
61|:----------------------------------------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|
62| swiftcbor | 17 | 17 | 17 | 17 | 18 | 23 | 35 | 10000 |
63| Current_run | 5 | 5 | 5 | 5 | 5 | 6 | 19 | 10000 |
64| Δ | -12 | -12 | -12 | -12 | -13 | -17 | -16 | 0 |
65| Improvement % | 71 | 71 | 71 | 71 | 72 | 74 | 46 | 0 |
66
67<p>
68</details>
69
70### Double metrics
71
72<details><summary>Time (total CPU): results within specified thresholds, fold down for details.</summary>
73<p>
74
75| Time (total CPU) (ns) * | p0 | p25 | p50 | p75 | p90 | p99 | p100 | Samples |
76|:----------------------------------------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|
77| swiftcbor | 5166 | 5251 | 5295 | 5335 | 5419 | 6087 | 24041 | 10000 |
78| Current_run | 916 | 1000 | 1001 | 1042 | 1083 | 1208 | 19666 | 10000 |
79| Δ | -4250 | -4251 | -4294 | -4293 | -4336 | -4879 | -4375 | 0 |
80| Improvement % | 82 | 81 | 81 | 80 | 80 | 80 | 18 | 0 |
81
82<p>
83</details>
84
85### Float metrics
86
87<details><summary>Time (total CPU): results within specified thresholds, fold down for details.</summary>
88<p>
89
90| Time (total CPU) (ns) * | p0 | p25 | p50 | p75 | p90 | p99 | p100 | Samples |
91|:----------------------------------------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|
92| swiftcbor | 5166 | 5251 | 5295 | 5335 | 5375 | 5959 | 24875 | 10000 |
93| Current_run | 916 | 1000 | 1000 | 1041 | 1042 | 1167 | 8417 | 10000 |
94| Δ | -4250 | -4251 | -4295 | -4294 | -4333 | -4792 | -16458 | 0 |
95| Improvement % | 82 | 81 | 81 | 80 | 81 | 80 | 66 | 0 |
96
97<p>
98</details>
99
100### Indeterminate String metrics
101
102<details><summary>Time (total CPU): results within specified thresholds, fold down for details.</summary>
103<p>
104
105| Time (total CPU) (ns) * | p0 | p25 | p50 | p75 | p90 | p99 | p100 | Samples |
106|:----------------------------------------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|
107| swiftcbor | 6124 | 6251 | 6251 | 6295 | 6375 | 7003 | 36250 | 10000 |
108| Current_run | 1292 | 1375 | 1417 | 1458 | 1500 | 1750 | 8459 | 10000 |
109| Δ | -4832 | -4876 | -4834 | -4837 | -4875 | -5253 | -27791 | 0 |
110| Improvement % | 79 | 78 | 77 | 77 | 76 | 75 | 77 | 0 |
111
112<p>
113</details>
114
115### Int metrics
116
117<details><summary>Time (total CPU): results within specified thresholds, fold down for details.</summary>
118<p>
119
120| Time (total CPU) (ns) * | p0 | p25 | p50 | p75 | p90 | p99 | p100 | Samples |
121|:----------------------------------------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|
122| swiftcbor | 5083 | 5211 | 5211 | 5251 | 5335 | 5919 | 19542 | 10000 |
123| Current_run | 1041 | 1124 | 1125 | 1166 | 1167 | 1292 | 20833 | 10000 |
124| Δ | -4042 | -4087 | -4086 | -4085 | -4168 | -4627 | 1291 | 0 |
125| Improvement % | 80 | 78 | 78 | 78 | 78 | 78 | -7 | 0 |
126
127<p>
128</details>
129
130### Int Small metrics
131
132<details><summary>Time (total CPU): results within specified thresholds, fold down for details.</summary>
133<p>
134
135| Time (total CPU) (ns) * | p0 | p25 | p50 | p75 | p90 | p99 | p100 | Samples |
136|:----------------------------------------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|
137| swiftcbor | 5082 | 5167 | 5211 | 5211 | 5291 | 5711 | 20708 | 10000 |
138| Current_run | 958 | 1083 | 1083 | 1125 | 1125 | 1250 | 16792 | 10000 |
139| Δ | -4124 | -4084 | -4128 | -4086 | -4166 | -4461 | -3916 | 0 |
140| Improvement % | 81 | 79 | 79 | 78 | 79 | 78 | 19 | 0 |
141
142<p>
143</details>
144
145### Simple Object metrics
146
147<details><summary>Time (total CPU): results within specified thresholds, fold down for details.</summary>
148<p>
149
150| Time (total CPU) (ns) * | p0 | p25 | p50 | p75 | p90 | p99 | p100 | Samples |
151|:----------------------------------------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|
152| swiftcbor | 35 | 36 | 36 | 37 | 37 | 43 | 56 | 10000 |
153| Current_run | 8 | 8 | 8 | 8 | 8 | 9 | 21 | 10000 |
154| Δ | -27 | -28 | -28 | -29 | -29 | -34 | -35 | 0 |
155| Improvement % | 77 | 78 | 78 | 78 | 78 | 79 | 62 | 0 |
156
157<p>
158</details>
159
160### String metrics
161
162<details><summary>Time (total CPU): results within specified thresholds, fold down for details.</summary>
163<p>
164
165| Time (total CPU) (ns) * | p0 | p25 | p50 | p75 | p90 | p99 | p100 | Samples |
166|:----------------------------------------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|
167| swiftcbor | 5293 | 5419 | 5459 | 5459 | 5503 | 5959 | 20499 | 10000 |
168| Current_run | 1166 | 1251 | 1292 | 1333 | 1334 | 1583 | 15584 | 10000 |
169| Δ | -4127 | -4168 | -4167 | -4126 | -4169 | -4376 | -4915 | 0 |
170| Improvement % | 78 | 77 | 76 | 76 | 76 | 73 | 24 | 0 |
171
172<p>
173</details>
174
175### String Small metrics
176
177<details><summary>Time (total CPU): results within specified thresholds, fold down for details.</summary>
178<p>
179
180| Time (total CPU) (ns) * | p0 | p25 | p50 | p75 | p90 | p99 | p100 | Samples |
181|:----------------------------------------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|----------:|
182| swiftcbor | 5124 | 5251 | 5291 | 5335 | 5459 | 6295 | 25084 | 10000 |
183| Current_run | 1041 | 1125 | 1126 | 1167 | 1208 | 1334 | 9250 | 10000 |
184| Δ | -4083 | -4126 | -4165 | -4168 | -4251 | -4961 | -15834 | 0 |
185| Improvement % | 80 | 79 | 79 | 78 | 78 | 79 | 63 | 0 |
186
187<p>
188</details>