Skip to content

Parse bare values in nested arrays#332

Merged
dduan merged 1 commit into
mainfrom
agent/fix-nested-array-scalars
Jul 10, 2026
Merged

Parse bare values in nested arrays#332
dduan merged 1 commit into
mainfrom
agent/fix-nested-array-scalars

Conversation

@dduan

@dduan dduan commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • accept bare scalar tokens while recursively parsing nested arrays
  • cover nested Boolean and special-float values with parameterized regression tests

Root cause

Recursive array parsing accepted only .string leaf tokens, while Boolean and special-float values are emitted as .bareKey tokens.

Validation

  • swift test --filter TOMLDecoderTests.nestedBooleanAndSpecialFloatArraysParse
  • swift test (751 tests)

Closes #330

@dduan dduan enabled auto-merge (squash) July 10, 2026 19:12
@github-actions

Copy link
Copy Markdown

�[33mWarning: running with the Swift runtime interposer on Linux to avoid the Swift 6.3 runtime hook crash. See https://github.com/ordo-one/benchmark/issues/349�[0m

Comparing results between 'main' and 'pull_request'

Host 'runnervm5mmn9' with 4 'x86_64' processors with 15 GB memory, running:
#18~24.04.1-Ubuntu SMP Thu May 28 16:39:11 UTC 2026

TOMLDecoderBenchmarks

Decode toml.io example metrics

Time (wall clock): results within specified thresholds, fold down for details.

Time (wall clock) (μs) * p0 p25 p50 p75 p90 p99 p100 Samples
main 48 50 51 54 57 65 114 10000
pull_request 48 50 51 55 57 66 209 10000
Δ 0 0 0 1 0 1 95 0
Improvement % 0 0 0 -2 0 -2 -83 0

Retains: results within specified thresholds, fold down for details.

Retains * p0 p25 p50 p75 p90 p99 p100 Samples
main 765 765 765 765 765 765 765 10000
pull_request 765 765 765 765 765 765 765 10000
Δ 0 0 0 0 0 0 0 0
Improvement % 0 0 0 0 0 0 0 0

Parse toml.io example metrics

Time (wall clock): results within specified thresholds, fold down for details.

Time (wall clock) (ns) * p0 p25 p50 p75 p90 p99 p100 Samples
main 3664 3819 3883 3945 4247 4703 66977 10000
pull_request 3709 3855 3929 4041 4351 4943 34346 10000
Δ 45 36 46 96 104 240 -32631 0
Improvement % -1 -1 -1 -2 -2 -5 49 0

Retains: results within specified thresholds, fold down for details.

Retains * p0 p25 p50 p75 p90 p99 p100 Samples
main 31 31 31 31 31 31 31 10000
pull_request 31 31 31 31 31 31 31 10000
Δ 0 0 0 0 0 0 0 0
Improvement % 0 0 0 0 0 0 0 0

decode canada.toml metrics

Time (wall clock): results within specified thresholds, fold down for details.

Time (wall clock) (ms) * p0 p25 p50 p75 p90 p99 p100 Samples
main 195 196 197 203 207 207 207 6
pull_request 197 199 199 201 201 201 201 6
Δ 2 3 2 -2 -6 -6 -6 0
Improvement % -1 -2 -1 1 3 3 3 0

Retains: results within specified thresholds, fold down for details.

Retains (K) * p0 p25 p50 p75 p90 p99 p100 Samples
main 1286 1286 1286 1286 1286 1286 1286 6
pull_request 1286 1286 1286 1286 1286 1286 1286 6
Δ 0 0 0 0 0 0 0 0
Improvement % 0 0 0 0 0 0 0 0

decode twitter.toml metrics

Time (wall clock): results within specified thresholds, fold down for details.

Time (wall clock) (μs) * p0 p25 p50 p75 p90 p99 p100 Samples
main 7779 8385 8495 8733 9175 9757 9833 116
pull_request 7810 8241 8405 8692 9060 9282 9311 117
Δ 31 -144 -90 -41 -115 -475 -522 1
Improvement % 0 2 1 0 1 5 5 1

Retains: results within specified thresholds, fold down for details.

Retains (K) * p0 p25 p50 p75 p90 p99 p100 Samples
main 113 113 113 113 113 113 113 116
pull_request 113 113 113 113 113 113 113 117
Δ 0 0 0 0 0 0 0 1
Improvement % 0 0 0 0 0 0 0 1

parse GitHub events archive metrics

Time (wall clock): results within specified thresholds, fold down for details.

Time (wall clock) (ms) * p0 p25 p50 p75 p90 p99 p100 Samples
main 107 108 109 111 113 119 119 10
pull_request 110 113 115 118 122 122 122 9
Δ 3 5 6 7 9 3 3 -1
Improvement % -3 -5 -6 -6 -8 -3 -3 -1

Retains: results within specified thresholds, fold down for details.

Retains (K) * p0 p25 p50 p75 p90 p99 p100 Samples
main 394 394 394 394 394 394 394 10
pull_request 394 394 394 394 394 394 394 9
Δ 0 0 0 0 0 0 0 -1
Improvement % 0 0 0 0 0 0 0 -1

parse canada.toml metrics

Time (wall clock): results within specified thresholds, fold down for details.

Time (wall clock) (ms) * p0 p25 p50 p75 p90 p99 p100 Samples
main 14 14 14 14 14 19 19 72
pull_request 14 14 14 15 15 20 20 70
Δ 0 0 0 1 1 1 1 -2
Improvement % 0 0 0 -7 -7 -5 -5 -2

Retains: results within specified thresholds, fold down for details.

Retains * p0 p25 p50 p75 p90 p99 p100 Samples
main 47 47 47 47 47 47 47 72
pull_request 47 47 47 47 47 47 47 70
Δ 0 0 0 0 0 0 0 -2
Improvement % 0 0 0 0 0 0 0 -2

parse twitter.toml metrics

Time (wall clock): results within specified thresholds, fold down for details.

Time (wall clock) (μs) * p0 p25 p50 p75 p90 p99 p100 Samples
main 1837 1854 1866 1905 1930 2140 2752 520
pull_request 1856 1880 1922 1955 2103 2146 2718 506
Δ 19 26 56 50 173 6 -34 -14
Improvement % -1 -1 -3 -3 -9 0 1 -14

Retains: results within specified thresholds, fold down for details.

Retains * p0 p25 p50 p75 p90 p99 p100 Samples
main 7736 7736 7736 7736 7736 7736 7736 520
pull_request 7736 7736 7736 7736 7736 7736 7736 506
Δ 0 0 0 0 0 0 0 -14
Improvement % 0 0 0 0 0 0 0 -14

@dduan dduan merged commit 7012220 into main Jul 10, 2026
16 checks passed
@dduan dduan deleted the agent/fix-nested-array-scalars branch July 10, 2026 19:17
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.

Parse boolean and special-float values in nested arrays

1 participant