Skip to content

Reserve parser storage upfront#310

Merged
dduan merged 1 commit intomainfrom
dd/reserve-parser-storage-upfront
Feb 6, 2026
Merged

Reserve parser storage upfront#310
dduan merged 1 commit intomainfrom
dd/reserve-parser-storage-upfront

Conversation

@dduan
Copy link
Owner

@dduan dduan commented Feb 6, 2026

Estimate key/value and node counts from input size and reserve parser arrays before tokenization. Cut dynamic array growth and copy churn in hot parse paths.

Estimate key/value and node counts from input size and reserve parser arrays before tokenization. Cut dynamic array growth and copy churn in hot parse paths.
@dduan dduan enabled auto-merge (squash) February 6, 2026 08:45
@github-actions
Copy link

github-actions bot commented Feb 6, 2026

Comparing results between 'main' and 'pull_request'

Host 'runnervmkj6or' with 4 'x86_64' processors with 15 GB memory, running:
#18~24.04.1-Ubuntu SMP Sat Jun 28 04:46:03 UTC 2025

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 65 66 66 67 70 84 142 7311
pull_request 65 66 66 67 70 85 151 7284
Δ 0 0 0 0 0 1 9 -27
Improvement % 0 0 0 0 0 -1 -6 -27

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

Retains * p0 p25 p50 p75 p90 p99 p100 Samples
main 604 604 605 605 605 605 605 7311
pull_request 604 604 604 604 604 604 604 7284
Δ 0 0 -1 -1 -1 -1 -1 -27
Improvement % 0 0 0 0 0 0 0 -27

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 6122 6263 6303 6355 6435 9799 20558 10000
pull_request 5420 5543 5583 5631 5703 7123 25278 10000
Δ -702 -720 -720 -724 -732 -2676 4720 0
Improvement % 11 11 11 11 11 27 -23 0

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

Retains * p0 p25 p50 p75 p90 p99 p100 Samples
main 13 14 14 14 14 14 14 10000
pull_request 13 14 14 14 14 14 14 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 264 264 265 265 265 265 265 4
pull_request 264 264 265 266 266 266 266 4
Δ 0 0 0 1 1 1 1 0
Improvement % 0 0 0 0 0 0 0 0

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

Retains (K) * p0 p25 p50 p75 p90 p99 p100 Samples
main 1674 1674 1674 1674 1674 1674 1674 4
pull_request 1674 1674 1674 1674 1674 1674 1674 4
Δ 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 8876 8929 8946 8962 9003 9265 9447 111
pull_request 8833 8864 8880 8897 8921 9150 9397 112
Δ -43 -65 -66 -65 -82 -115 -50 1
Improvement % 0 1 1 1 1 1 1 1

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

Retains (K) * p0 p25 p50 p75 p90 p99 p100 Samples
main 68 68 68 68 68 68 68 111
pull_request 68 68 68 68 68 68 68 112
Δ 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 162 163 164 172 173 173 173 6
pull_request 157 157 158 158 159 159 159 7
Δ -5 -6 -6 -14 -14 -14 -14 1
Improvement % 3 4 4 8 8 8 8 1

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

Retains (K) * p0 p25 p50 p75 p90 p99 p100 Samples
main 150 150 150 150 150 150 150 6
pull_request 150 150 150 150 150 150 150 7
Δ 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 17 17 17 18 18 19 19 58
pull_request 16 16 16 17 17 18 18 61
Δ -1 -1 -1 -1 -1 -1 -1 3
Improvement % 6 6 6 6 6 5 5 3

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

Retains * p0 p25 p50 p75 p90 p99 p100 Samples
main 133 134 134 134 134 134 134 58
pull_request 133 134 134 134 134 134 134 61
Δ 0 0 0 0 0 0 0 3
Improvement % 0 0 0 0 0 0 0 3

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 2696 2716 2724 2736 2759 2861 3251 359
pull_request 2663 2687 2697 2705 2716 2800 3409 363
Δ -33 -29 -27 -31 -43 -61 158 4
Improvement % 1 1 1 1 2 2 -5 4

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

Retains * p0 p25 p50 p75 p90 p99 p100 Samples
main 3138 3139 3139 3139 3139 3139 3139 359
pull_request 3138 3139 3139 3139 3139 3139 3139 363
Δ 0 0 0 0 0 0 0 4
Improvement % 0 0 0 0 0 0 0 4

@dduan dduan merged commit 835b76d into main Feb 6, 2026
16 checks passed
@dduan dduan deleted the dd/reserve-parser-storage-upfront branch February 6, 2026 08:55
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.

1 participant