smol-toml 1.7.1 โ 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +205 -191
- package/dist/date.d.ts +0 -1
- package/dist/date.js +0 -1
- package/dist/error.d.ts +0 -1
- package/dist/error.js +0 -1
- package/dist/extract.js +32 -65
- package/dist/index.cjs +302 -288
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/parse.d.ts +1 -3
- package/dist/parse.js +22 -21
- package/dist/primitive.js +75 -76
- package/dist/stringify.d.ts +0 -1
- package/dist/stringify.js +43 -30
- package/dist/struct.js +90 -93
- package/dist/util.d.ts +1 -1
- package/dist/util.js +36 -39
- package/package.json +6 -6
- package/dist/date.d.ts.map +0 -1
- package/dist/date.js.map +0 -1
- package/dist/error.d.ts.map +0 -1
- package/dist/error.js.map +0 -1
- package/dist/extract.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/parse.d.ts.map +0 -1
- package/dist/parse.js.map +0 -1
- package/dist/primitive.d.ts +0 -29
- package/dist/primitive.d.ts.map +0 -1
- package/dist/primitive.js.map +0 -1
- package/dist/stringify.d.ts.map +0 -1
- package/dist/stringify.js.map +0 -1
- package/dist/struct.js.map +0 -1
- package/dist/util.d.ts.map +0 -1
- package/dist/util.js.map +0 -1
- package/src/date.ts +0 -152
- package/src/error.ts +0 -77
- package/src/extract.ts +0 -113
- package/src/index.ts +0 -42
- package/src/parse.ts +0 -184
- package/src/primitive.ts +0 -249
- package/src/stringify.ts +0 -191
- package/src/struct.ts +0 -202
- package/src/util.ts +0 -106
package/README.md
CHANGED
|
@@ -66,7 +66,7 @@ A few notes on the `stringify` function:
|
|
|
66
66
|
- By default, floats will be serialized as integers if they don't have a decimal part. See [Integers](#integers)
|
|
67
67
|
- `stringify(parse('a = 1.0')) === 'a = 1'`
|
|
68
68
|
- JS `Date` will be serialized as Offset Date Time
|
|
69
|
-
- Use the [`TomlDate` object](#dates)
|
|
69
|
+
- Use the [Temporal API] for representing other types (or alternatively the legacy [`TomlDate` object](#dates)).
|
|
70
70
|
|
|
71
71
|
### Integers
|
|
72
72
|
When parsing, both integers and floats are read as plain JavaScript numbers, which essentially are floats. This means
|
|
@@ -101,8 +101,22 @@ const toml = stringify(obj, { numbersAsFloat: true })
|
|
|
101
101
|
```
|
|
102
102
|
|
|
103
103
|
### Dates
|
|
104
|
-
`smol-toml` uses an extended `Date` object to represent all types of TOML Dates. In the future, `smol-toml` will
|
|
105
|
-
objects from the Temporal
|
|
104
|
+
`smol-toml` uses an extended `Date` object to represent all types of TOML Dates. In the future, `smol-toml` will emit
|
|
105
|
+
objects from the Temporal API, but for now it only supports `Date` when parsing. When stringifying, `smol-toml` does
|
|
106
|
+
support objects from the [Temporal API] and will output the appropriate TOML type.
|
|
107
|
+
|
|
108
|
+
> [!IMPORTANT]
|
|
109
|
+
> If you create a `ZonedDateTime` with a timezone, it will be turned into an offset date-time; losing its precise timezone.
|
|
110
|
+
>
|
|
111
|
+
> For instance, if you create one with the timezone `Europe/Paris`, it'll be turned into an offset date-time `+02:00`
|
|
112
|
+
> or `+01:00`, depending on the offset observed at the instant referred to by the date-time.
|
|
113
|
+
>
|
|
114
|
+
> ```js
|
|
115
|
+
> Temporal.ZonedDateTime.from({ year: 2001, month: 9, day: 21, hour: 10, minute: 17, second: 0, timeZone: 'Europe/Paris' }).toString({ timeZoneName: 'never' })
|
|
116
|
+
> // 2001-09-21T10:17:00+02:00
|
|
117
|
+
> Temporal.ZonedDateTime.from({ year: 2012, month: 3, day: 19, hour: 8, minute: 0, second: 0, timeZone: 'Europe/Paris' }).toString({ timeZoneName: 'never' })
|
|
118
|
+
> // 2012-03-19T08:00:00+01:00
|
|
119
|
+
> ```
|
|
106
120
|
|
|
107
121
|
```js
|
|
108
122
|
import { TomlDate } from 'smol-toml'
|
|
@@ -154,15 +168,15 @@ While `fast-toml` is included as it's a challenging candidate, it takes a lot of
|
|
|
154
168
|
but at the expense of correctness (it has significant defects and does not pass the TOML test suite). `smol-toml` is
|
|
155
169
|
almost as fast, without sacrificing correctness. ๐
|
|
156
170
|
|
|
157
|
-
| **Parse** | smol-toml@1.7.
|
|
158
|
-
|
|
159
|
-
| Spec example | **4.
|
|
160
|
-
| ~5MB test file |
|
|
171
|
+
| **Parse** | smol-toml@1.7.2 | @iarna/toml@3.0.0 | @ltd/j-toml@1.38.0 | fast-toml@0.5.4 | @std/toml@1.0.11 | toml@5.0.0 | js-toml@2.0.1 | @decimalturn/toml-patch@3.0.2 |
|
|
172
|
+
|----------------|--------------------|-------------------|--------------------|-------------------|------------------|----------------|----------------|-------------------------------|
|
|
173
|
+
| Spec example | **4.16 ยตs/iter** | 12.13 ยตs/iter | 30.44 ยตs/iter | 5.01 ยตs/iter | 22.34 ยตs/iter | 32.28 ยตs/iter | 24.71 ยตs/iter | 17.07 ยตs/iter |
|
|
174
|
+
| ~5MB test file | *113.76 ms/iter* | *DNF* | 189.89 ms/iter | **92.24 ms/iter** | 419.95 ms/iter | 549.86 ms/iter | 336.03 ms/iter | 186.32 ms/iter |
|
|
161
175
|
|
|
162
|
-
| **Stringify** | smol-toml@1.7.
|
|
176
|
+
| **Stringify** | smol-toml@1.7.2 | @iarna/toml@3.0.0 | @ltd/j-toml@1.38.0 | fast-toml@0.5.4 | @std/toml@1.0.11 | toml@5.0.0 | js-toml@2.0.1 | @decimalturn/toml-patch@3.0.2 |
|
|
163
177
|
|----------------|--------------------|-------------------|--------------------|-----------------|------------------|----------------|----------------|-------------------------------|
|
|
164
|
-
| Spec example | **2.
|
|
165
|
-
| ~5MB test file | **
|
|
178
|
+
| Spec example | **2.29 ยตs/iter** | 8.58 ยตs/iter | 89.59 ยตs/iter | N/A | 3.96 ยตs/iter | N/A | 3.69 ยตs/iter | N/A[^toml-patch-note] |
|
|
179
|
+
| ~5MB test file | **45.33 ms/iter** | 130.01 ms/iter | 928.19 ms/iter | N/A | 68.58 ms/iter | N/A | 110.26 ms/iter | N/A[^toml-patch-note] |
|
|
166
180
|
|
|
167
181
|
[^toml-patch-note]: Stringify performance is not included here, as the library is not meant to be fast, but rather
|
|
168
182
|
capable of doing precise non-destructive edits that preserve the entire document's shape and format. Putting it here
|
|
@@ -173,79 +187,79 @@ wouldn't be fair.
|
|
|
173
187
|
|
|
174
188
|
```
|
|
175
189
|
node --expose-gc bench/parse.bench.ts
|
|
176
|
-
clk: ~5.
|
|
190
|
+
clk: ~5.52 GHz
|
|
177
191
|
cpu: AMD Ryzen 9 9950X3D 16-Core Processor
|
|
178
|
-
runtime: node 26.
|
|
192
|
+
runtime: node 26.5.0 (x64-linux)
|
|
179
193
|
|
|
180
194
|
benchmark avg (min โฆ max) p75 / p99 (min โฆ top 1%)
|
|
181
195
|
------------------------------------------- -------------------------------
|
|
182
196
|
โข spec document
|
|
183
197
|
------------------------------------------- -------------------------------
|
|
184
|
-
smol-toml 4.
|
|
185
|
-
(
|
|
186
|
-
(
|
|
187
|
-
4.01 ipc ( 99.
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
@iarna/toml 12.
|
|
191
|
-
(11.
|
|
192
|
-
(
|
|
193
|
-
3.97 ipc ( 99.
|
|
194
|
-
68.
|
|
195
|
-
|
|
196
|
-
@ltd/j-toml
|
|
197
|
-
(
|
|
198
|
-
(
|
|
199
|
-
3.
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
fast-toml
|
|
203
|
-
(4.
|
|
204
|
-
(
|
|
205
|
-
4.
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
deno's @std/toml 22.
|
|
209
|
-
(
|
|
210
|
-
(
|
|
211
|
-
3.
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
node-toml
|
|
215
|
-
(
|
|
216
|
-
(
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
js-toml
|
|
221
|
-
(
|
|
222
|
-
(
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
@decimalturn/toml-patch 17.
|
|
227
|
-
(
|
|
228
|
-
(
|
|
229
|
-
3.
|
|
230
|
-
|
|
198
|
+
smol-toml 4.16 ยตs/iter 4.14 ยตs โ
|
|
199
|
+
(3.99 ยตs โฆ 91.94 ยตs) 4.95 ยตs โโโ
|
|
200
|
+
( 1.41 kb โฆ 417.70 kb) 9.63 kb โโโโโ
โโโโโโโโโโโโโโโโ
|
|
201
|
+
4.01 ipc ( 99.54% cache) 19.70 branch misses
|
|
202
|
+
23.81k cycles 95.44k instructions 3.05k c-refs 14.12 c-misses
|
|
203
|
+
|
|
204
|
+
@iarna/toml 12.13 ยตs/iter 12.04 ยตs โ
|
|
205
|
+
(11.59 ยตs โฆ 133.43 ยตs) 15.94 ยตs โโ
|
|
206
|
+
( 0.00 b โฆ 677.01 kb) 24.08 kb โโโโโโโโโโโโโโโโโโโโโ
|
|
207
|
+
3.97 ipc ( 99.63% cache) 75.32 branch misses
|
|
208
|
+
68.16k cycles 270.90k instructions 10.39k c-refs 38.82 c-misses
|
|
209
|
+
|
|
210
|
+
@ltd/j-toml 30.44 ยตs/iter 29.57 ยตs โ
|
|
211
|
+
(28.19 ยตs โฆ 1.18 ms) 44.30 ยตs โโ
|
|
212
|
+
(432.00 b โฆ 692.05 kb) 27.57 kb โโโโโโโโโโโโโโโโโโโโโ
|
|
213
|
+
3.42 ipc ( 99.37% cache) 284.51 branch misses
|
|
214
|
+
169.50k cycles 579.61k instructions 25.59k c-refs 162.02 c-misses
|
|
215
|
+
|
|
216
|
+
fast-toml 5.01 ยตs/iter 4.98 ยตs โโ
|
|
217
|
+
(4.75 ยตs โฆ 90.47 ยตs) 5.84 ยตs โโโ
|
|
218
|
+
(336.00 b โฆ 302.06 kb) 12.56 kb โโ
โโโโโ
โโโโโโโโโโโโโโ
|
|
219
|
+
4.40 ipc ( 99.53% cache) 25.73 branch misses
|
|
220
|
+
28.21k cycles 124.23k instructions 3.76k c-refs 17.82 c-misses
|
|
221
|
+
|
|
222
|
+
deno's @std/toml 22.34 ยตs/iter 22.15 ยตs โโ
|
|
223
|
+
(20.78 ยตs โฆ 155.43 ยตs) 36.68 ยตs โโ
|
|
224
|
+
( 1.52 kb โฆ 547.05 kb) 64.73 kb โโโโโโโโโโโโโโโโโโโโโ
|
|
225
|
+
3.80 ipc ( 99.53% cache) 111.24 branch misses
|
|
226
|
+
124.05k cycles 471.06k instructions 21.13k c-refs 100.20 c-misses
|
|
227
|
+
|
|
228
|
+
node-toml 32.28 ยตs/iter 31.78 ยตs โ
|
|
229
|
+
(30.33 ยตs โฆ 221.49 ยตs) 53.65 ยตs โ
|
|
230
|
+
( 2.00 kb โฆ 968.27 kb) 109.52 kb โโโโโโโโโโโโโโโโโโโโโ
|
|
231
|
+
3.89 ipc ( 99.18% cache) 193.02 branch misses
|
|
232
|
+
178.72k cycles 695.61k instructions 29.40k c-refs 240.75 c-misses
|
|
233
|
+
|
|
234
|
+
js-toml 24.71 ยตs/iter 23.17 ยตs โ
โ
|
|
235
|
+
(21.20 ยตs โฆ 731.20 ยตs) 39.47 ยตs โโ
|
|
236
|
+
(744.00 b โฆ 861.36 kb) 92.95 kb โโโโ
โโโโโโโโโโโโโโโโโ
|
|
237
|
+
3.79 ipc ( 98.12% cache) 205.75 branch misses
|
|
238
|
+
134.81k cycles 510.43k instructions 19.00k c-refs 357.65 c-misses
|
|
239
|
+
|
|
240
|
+
@decimalturn/toml-patch 17.07 ยตs/iter 16.85 ยตs โโ
|
|
241
|
+
(15.93 ยตs โฆ 224.97 ยตs) 23.30 ยตs โโ
|
|
242
|
+
(632.00 b โฆ 635.14 kb) 55.51 kb โโโโโโโโโโโโโโโโโโโโโ
|
|
243
|
+
3.56 ipc ( 99.37% cache) 73.96 branch misses
|
|
244
|
+
95.58k cycles 339.88k instructions 18.52k c-refs 116.43 c-misses
|
|
231
245
|
|
|
232
246
|
summary
|
|
233
|
-
|
|
234
|
-
1.
|
|
235
|
-
2.
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
247
|
+
smol-toml
|
|
248
|
+
1.2x faster than fast-toml
|
|
249
|
+
2.92x faster than @iarna/toml
|
|
250
|
+
4.1x faster than @decimalturn/toml-patch
|
|
251
|
+
5.37x faster than deno's @std/toml
|
|
252
|
+
5.94x faster than js-toml
|
|
253
|
+
7.31x faster than @ltd/j-toml
|
|
254
|
+
7.76x faster than node-toml
|
|
241
255
|
|
|
242
256
|
โข 5MB document
|
|
243
257
|
------------------------------------------- -------------------------------
|
|
244
|
-
smol-toml
|
|
245
|
-
(
|
|
246
|
-
(
|
|
247
|
-
2.
|
|
248
|
-
|
|
258
|
+
smol-toml 113.76 ms/iter 115.67 ms โ โ โ
|
|
259
|
+
(106.25 ms โฆ 121.53 ms) 118.63 ms โ
โ โ
โ โ
โ โ
โ
|
|
260
|
+
( 37.31 mb โฆ 49.50 mb) 43.97 mb โโโโโโโโโโโโโโโโโโโโโ
|
|
261
|
+
2.47 ipc ( 98.58% cache) 3.12M branch misses
|
|
262
|
+
606.38M cycles 1.50G instructions 78.32M c-refs 1.11M c-misses
|
|
249
263
|
|
|
250
264
|
@iarna/toml error: Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z at row 5, col 45, pos 569:
|
|
251
265
|
4: NfF6LuAerfn5mDPI7Cp 2qsrB4vGmJTyb5jNubOIBYYWrWlAsrw PX93S57gjb5GEhR8qOU5blDQmwfVJTA YvmJ9cE3cUZU NAJQgAbIdpZLhc4lOs4ZhMEWehhZqXCsVD1YP1vN2GEoM2WX''', 1986-05-27T18:36:13Z, -5460, "2ZAV3fYlb23hf7r7QoftVlicWE2iuwp", 4790.2253 ]
|
|
@@ -255,150 +269,150 @@ smol-toml 116.74 ms/iter 118.39 ms โ โ
|
|
|
255
269
|
|
|
256
270
|
|
|
257
271
|
|
|
258
|
-
@ltd/j-toml
|
|
259
|
-
(
|
|
260
|
-
(
|
|
261
|
-
2.
|
|
262
|
-
1.
|
|
272
|
+
@ltd/j-toml 189.89 ms/iter 197.10 ms โโ โ
|
|
273
|
+
(172.17 ms โฆ 237.08 ms) 210.60 ms โ
โ
โโ โ
โ
โ โ
|
|
274
|
+
( 19.71 mb โฆ 56.03 mb) 36.30 mb โโโโโโโโโโโโโโโโโโโโโ
|
|
275
|
+
2.41 ipc ( 97.92% cache) 3.88M branch misses
|
|
276
|
+
1.03G cycles 2.49G instructions 143.96M c-refs 3.00M c-misses
|
|
263
277
|
|
|
264
|
-
fast-toml
|
|
265
|
-
(
|
|
266
|
-
( 13.
|
|
267
|
-
2.
|
|
268
|
-
|
|
278
|
+
fast-toml 92.24 ms/iter 95.41 ms โ โ
|
|
279
|
+
(88.83 ms โฆ 96.21 ms) 96.00 ms โ โ
โ
โ
โโ
โ
โ
โ
|
|
280
|
+
( 13.32 mb โฆ 34.90 mb) 24.06 mb โโโโโโโโโโโโโโโโโโโโโ
|
|
281
|
+
2.90 ipc ( 98.44% cache) 2.44M branch misses
|
|
282
|
+
495.57M cycles 1.44G instructions 56.61M c-refs 881.60k c-misses
|
|
269
283
|
|
|
270
|
-
deno's @std/toml
|
|
271
|
-
(
|
|
272
|
-
(
|
|
273
|
-
3.
|
|
274
|
-
2.
|
|
284
|
+
deno's @std/toml 419.95 ms/iter 428.09 ms โ
|
|
285
|
+
(408.44 ms โฆ 434.51 ms) 431.58 ms โ โ
|
|
286
|
+
(182.20 mb โฆ 203.81 mb) 188.26 mb โโโโโโโโโโโโโโโโโโโโโ
|
|
287
|
+
3.28 ipc ( 97.22% cache) 6.72M branch misses
|
|
288
|
+
2.27G cycles 7.46G instructions 215.21M c-refs 5.98M c-misses
|
|
275
289
|
|
|
276
|
-
node-toml
|
|
277
|
-
(
|
|
278
|
-
(
|
|
279
|
-
4.
|
|
280
|
-
2.
|
|
290
|
+
node-toml 549.86 ms/iter 559.64 ms โ โ
|
|
291
|
+
(527.73 ms โฆ 574.83 ms) 571.47 ms โ
โ
โ โ
โ
โ โ
โ
โ
|
|
292
|
+
( 21.62 mb โฆ 74.99 mb) 46.84 mb โโโโโโโโโโโโโโโโโโโโโ
|
|
293
|
+
4.24 ipc ( 96.62% cache) 6.29M branch misses
|
|
294
|
+
2.95G cycles 12.49G instructions 236.46M c-refs 7.99M c-misses
|
|
281
295
|
|
|
282
|
-
js-toml
|
|
283
|
-
(
|
|
284
|
-
(
|
|
285
|
-
2.
|
|
286
|
-
1.
|
|
296
|
+
js-toml 336.03 ms/iter 328.58 ms โ
|
|
297
|
+
(310.28 ms โฆ 431.93 ms) 379.93 ms โ
โ โ
|
|
298
|
+
(267.75 mb โฆ 279.44 mb) 273.42 mb โโโโโโโโโโโโโโโโโโโโโ
|
|
299
|
+
2.02 ipc ( 94.74% cache) 5.08M branch misses
|
|
300
|
+
1.65G cycles 3.33G instructions 113.18M c-refs 5.95M c-misses
|
|
287
301
|
|
|
288
|
-
@decimalturn/toml-patch
|
|
289
|
-
(
|
|
290
|
-
(
|
|
291
|
-
|
|
292
|
-
|
|
302
|
+
@decimalturn/toml-patch 186.32 ms/iter 185.91 ms โ โ
|
|
303
|
+
(178.55 ms โฆ 209.69 ms) 190.20 ms โ
โ
โ
โ โ
โโ
โ
โ
|
|
304
|
+
( 22.18 mb โฆ 62.13 mb) 26.09 mb โโโโโโโโโโโโโโโโโโโโโ
|
|
305
|
+
2.90 ipc ( 97.50% cache) 3.72M branch misses
|
|
306
|
+
999.99M cycles 2.90G instructions 120.73M c-refs 3.01M c-misses
|
|
293
307
|
|
|
294
308
|
summary
|
|
295
309
|
fast-toml
|
|
296
|
-
1.
|
|
297
|
-
|
|
298
|
-
2.
|
|
299
|
-
3.
|
|
300
|
-
4.
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
310
|
+
1.23x faster than smol-toml
|
|
311
|
+
2.02x faster than @decimalturn/toml-patch
|
|
312
|
+
2.06x faster than @ltd/j-toml
|
|
313
|
+
3.64x faster than js-toml
|
|
314
|
+
4.55x faster than deno's @std/toml
|
|
315
|
+
5.96x faster than node-toml
|
|
304
316
|
node --expose-gc bench/stringify.bench.ts
|
|
305
|
-
clk: ~5.
|
|
317
|
+
clk: ~5.52 GHz
|
|
306
318
|
cpu: AMD Ryzen 9 9950X3D 16-Core Processor
|
|
307
|
-
runtime: node 26.
|
|
319
|
+
runtime: node 26.5.0 (x64-linux)
|
|
308
320
|
|
|
309
321
|
benchmark avg (min โฆ max) p75 / p99 (min โฆ top 1%)
|
|
310
322
|
------------------------------------------- -------------------------------
|
|
311
323
|
โข spec document
|
|
312
324
|
------------------------------------------- -------------------------------
|
|
313
|
-
smol-toml 2.
|
|
314
|
-
(2.
|
|
315
|
-
( 4.
|
|
316
|
-
4.
|
|
317
|
-
12.
|
|
318
|
-
|
|
319
|
-
@iarna/toml 8.
|
|
320
|
-
(8.
|
|
321
|
-
(
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
@ltd/j-toml 89.
|
|
326
|
-
(
|
|
327
|
-
( 4.
|
|
328
|
-
4.
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
deno's @std/toml 3.
|
|
332
|
-
(3.
|
|
333
|
-
(
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
js-toml 3.
|
|
338
|
-
(3.
|
|
339
|
-
(
|
|
340
|
-
4.
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
@decimalturn/toml-patch
|
|
344
|
-
(
|
|
345
|
-
(
|
|
346
|
-
4.
|
|
347
|
-
|
|
325
|
+
smol-toml 2.29 ยตs/iter 2.30 ยตs โ
โ
|
|
326
|
+
(2.26 ยตs โฆ 2.33 ยตs) 2.33 ยตs โโ โโโ โโโ โ
|
|
327
|
+
( 4.28 kb โฆ 4.65 kb) 4.54 kb โโโโโโโโโโโโโโโโโโโโโ
|
|
328
|
+
4.45 ipc ( 99.40% cache) 5.23 branch misses
|
|
329
|
+
12.67k cycles 56.39k instructions 909.08 c-refs 5.43 c-misses
|
|
330
|
+
|
|
331
|
+
@iarna/toml 8.58 ยตs/iter 8.57 ยตs โ
|
|
332
|
+
(8.54 ยตs โฆ 8.79 ยตs) 8.63 ยตs โโโโ โ
|
|
333
|
+
(509.76 b โฆ 1.39 kb) 574.04 b โโโโโโโโโโโโโโโโโโโโโ
|
|
334
|
+
3.99 ipc ( 99.30% cache) 24.95 branch misses
|
|
335
|
+
48.05k cycles 191.70k instructions 6.20k c-refs 43.23 c-misses
|
|
336
|
+
|
|
337
|
+
@ltd/j-toml 89.59 ยตs/iter 89.41 ยตs โ
|
|
338
|
+
(70.85 ยตs โฆ 242.29 ยตs) 127.85 ยตs โ
|
|
339
|
+
( 4.02 kb โฆ 375.16 kb) 37.41 kb โโโโโโโโโโโโโโโโโโโโโ
|
|
340
|
+
4.16 ipc ( 99.69% cache) 721.33 branch misses
|
|
341
|
+
495.22k cycles 2.06M instructions 28.23k c-refs 88.81 c-misses
|
|
342
|
+
|
|
343
|
+
deno's @std/toml 3.96 ยตs/iter 3.96 ยตs โ โ โ
|
|
344
|
+
(3.91 ยตs โฆ 4.43 ยตs) 4.01 ยตs โ
โโ โโ
โ โ
|
|
345
|
+
(803.91 b โฆ 3.95 kb) 965.01 b โ
โโโโ
โโโโ
โโ
โ
โ
โ
โโโโโ
โโ
|
|
346
|
+
3.85 ipc ( 99.45% cache) 11.59 branch misses
|
|
347
|
+
22.20k cycles 85.43k instructions 3.02k c-refs 16.58 c-misses
|
|
348
|
+
|
|
349
|
+
js-toml 3.69 ยตs/iter 3.71 ยตs โ โ
|
|
350
|
+
(3.65 ยตs โฆ 3.82 ยตs) 3.77 ยตs โ
โโ
โโ โโ
โ
|
|
351
|
+
( 6.46 kb โฆ 7.23 kb) 7.10 kb โโโโโโโ
โโโโโ
โโโโโโ
โโโ
|
|
352
|
+
4.14 ipc ( 98.79% cache) 11.99 branch misses
|
|
353
|
+
20.62k cycles 85.48k instructions 1.97k c-refs 23.80 c-misses
|
|
354
|
+
|
|
355
|
+
@decimalturn/toml-patch 48.60 ยตs/iter 48.28 ยตs โ
|
|
356
|
+
(45.59 ยตs โฆ 296.88 ยตs) 81.95 ยตs โ
|
|
357
|
+
(128.00 b โฆ 703.46 kb) 93.31 kb โโโโโโโโโโโโโโโโโโโโโ
|
|
358
|
+
4.05 ipc ( 99.26% cache) 533.40 branch misses
|
|
359
|
+
270.34k cycles 1.09M instructions 37.72k c-refs 278.17 c-misses
|
|
348
360
|
|
|
349
361
|
summary
|
|
350
362
|
smol-toml
|
|
351
|
-
1.
|
|
363
|
+
1.61x faster than js-toml
|
|
352
364
|
1.73x faster than deno's @std/toml
|
|
353
|
-
3.
|
|
354
|
-
|
|
355
|
-
|
|
365
|
+
3.75x faster than @iarna/toml
|
|
366
|
+
21.25x faster than @decimalturn/toml-patch
|
|
367
|
+
39.18x faster than @ltd/j-toml
|
|
356
368
|
|
|
357
369
|
โข 5MB document
|
|
358
370
|
------------------------------------------- -------------------------------
|
|
359
|
-
smol-toml
|
|
360
|
-
(
|
|
361
|
-
( 9.
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
@iarna/toml
|
|
366
|
-
(
|
|
367
|
-
(
|
|
368
|
-
2.
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
@ltd/j-toml
|
|
372
|
-
(
|
|
373
|
-
(
|
|
374
|
-
4.
|
|
375
|
-
5.
|
|
376
|
-
|
|
377
|
-
deno's @std/toml 68.
|
|
378
|
-
(
|
|
379
|
-
( 29.
|
|
380
|
-
2.
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
js-toml
|
|
384
|
-
(
|
|
385
|
-
(
|
|
386
|
-
2.
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
@decimalturn/toml-patch
|
|
390
|
-
|
|
391
|
-
(
|
|
392
|
-
3.
|
|
393
|
-
5.
|
|
371
|
+
smol-toml 45.33 ms/iter 46.14 ms โ โ
|
|
372
|
+
(42.89 ms โฆ 48.08 ms) 47.97 ms โ
โ
โ
โ
โโ
โ โ
โ
|
|
373
|
+
( 9.41 mb โฆ 35.68 mb) 12.98 mb โโโโโโโโโโโโโโโโโโโโโ
|
|
374
|
+
1.98 ipc ( 94.06% cache) 1.62M branch misses
|
|
375
|
+
234.88M cycles 464.38M instructions 12.57M c-refs 746.25k c-misses
|
|
376
|
+
|
|
377
|
+
@iarna/toml 130.01 ms/iter 130.79 ms โ โ
|
|
378
|
+
(127.84 ms โฆ 135.01 ms) 132.06 ms โ โ
โ โ
โ
โ
โ
โ
โ
|
|
379
|
+
( 23.69 mb โฆ 51.95 mb) 41.55 mb โโโโโโโโโโโโโโโโโโโโโ
|
|
380
|
+
2.54 ipc ( 96.96% cache) 4.31M branch misses
|
|
381
|
+
707.33M cycles 1.80G instructions 73.12M c-refs 2.22M c-misses
|
|
382
|
+
|
|
383
|
+
@ltd/j-toml 928.19 ms/iter 933.90 ms โ
|
|
384
|
+
(903.30 ms โฆ 940.61 ms) 934.55 ms โ โ
|
|
385
|
+
( 1.89 mb โฆ 32.62 mb) 12.57 mb โโโโโโโโโโโโโโโโโโโโโ
|
|
386
|
+
4.02 ipc ( 99.15% cache) 7.29M branch misses
|
|
387
|
+
5.09G cycles 20.45G instructions 194.29M c-refs 1.66M c-misses
|
|
388
|
+
|
|
389
|
+
deno's @std/toml 68.58 ms/iter 70.20 ms โ
|
|
390
|
+
(63.51 ms โฆ 78.12 ms) 75.83 ms โ
โ
|
|
391
|
+
( 29.19 mb โฆ 62.19 mb) 33.69 mb โโโโโโโโโโโโโโโโโโโโโ
|
|
392
|
+
2.14 ipc ( 94.82% cache) 1.78M branch misses
|
|
393
|
+
341.59M cycles 731.18M instructions 26.60M c-refs 1.38M c-misses
|
|
394
|
+
|
|
395
|
+
js-toml 110.26 ms/iter 111.58 ms โ
|
|
396
|
+
(106.23 ms โฆ 118.30 ms) 116.43 ms โ
|
|
397
|
+
( 31.58 mb โฆ 62.06 mb) 43.79 mb โโโโโโโโโโโโโโโโโโโโโ
|
|
398
|
+
2.29 ipc ( 96.17% cache) 3.09M branch misses
|
|
399
|
+
596.81M cycles 1.36G instructions 41.90M c-refs 1.60M c-misses
|
|
400
|
+
|
|
401
|
+
@decimalturn/toml-patch 933.72 ms/iter 950.61 ms โ โ โ
|
|
402
|
+
(898.60 ms โฆ 969.27 ms) 955.92 ms โ โ
โ
โ
โ
โ โ
โ
|
|
403
|
+
(119.41 mb โฆ 147.95 mb) 122.51 mb โโโโโโโโโโโโโโโโโโโโโ
|
|
404
|
+
3.20 ipc ( 93.32% cache) 12.50M branch misses
|
|
405
|
+
5.05G cycles 16.18G instructions 694.63M c-refs 46.41M c-misses
|
|
394
406
|
|
|
395
407
|
summary
|
|
396
408
|
smol-toml
|
|
397
|
-
1.
|
|
398
|
-
2.
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
409
|
+
1.51x faster than deno's @std/toml
|
|
410
|
+
2.43x faster than js-toml
|
|
411
|
+
2.87x faster than @iarna/toml
|
|
412
|
+
20.48x faster than @ltd/j-toml
|
|
413
|
+
20.6x faster than @decimalturn/toml-patch
|
|
402
414
|
```
|
|
403
415
|
|
|
404
416
|
</details>
|
|
417
|
+
|
|
418
|
+
[Temporal API]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Temporal
|
package/dist/date.d.ts
CHANGED
package/dist/date.js
CHANGED
package/dist/error.d.ts
CHANGED
package/dist/error.js
CHANGED