Skip to content

Commit 7201ee8

Browse files
committed
Simplify merged segmentation state
1 parent e34c97d commit 7201ee8

5 files changed

Lines changed: 284 additions & 299 deletions

File tree

benchmarks/chrome.json

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
33
"results": [
44
{
55
"label": "Our library: prepare()",
6-
"ms": 10.800000011920929,
6+
"ms": 10.549999982118607,
77
"desc": "One cold 500-text measurement batch"
88
},
99
{
1010
"label": "Our library: layout()",
11-
"ms": 0.0975,
11+
"ms": 0.09700000002980233,
1212
"desc": "Normalized hot-path throughput per 500-text batch"
1313
},
1414
{
1515
"label": "DOM batch",
16-
"ms": 2.5,
16+
"ms": 2.6500000059604645,
1717
"desc": "Single 400→300px batch resize: write all, then read all"
1818
},
1919
{
2020
"label": "DOM interleaved",
21-
"ms": 27.799999982118607,
21+
"ms": 28.5,
2222
"desc": "Single 400→300px batch resize: write + read per div"
2323
}
2424
],
@@ -30,17 +30,17 @@
3030
},
3131
{
3232
"label": "Our library: layoutWithLines()",
33-
"ms": 0.03375000059604645,
33+
"ms": 0.034999999403953555,
3434
"desc": "60-text shared-corpus batch across widths 180/220/260px; materializes text lines"
3535
},
3636
{
3737
"label": "Our library: walkLineRanges()",
38-
"ms": 0.016250000149011613,
38+
"ms": 0.017499999701976778,
3939
"desc": "60-text shared-corpus batch across widths 180/220/260px; line ranges only, no line text strings"
4040
},
4141
{
4242
"label": "Our library: layoutNextLine()",
43-
"ms": 0.02750000059604645,
43+
"ms": 0.027499999850988388,
4444
"desc": "60-text shared-corpus batch across widths 180/220/260px; streaming line-by-line layout"
4545
}
4646
],
@@ -57,7 +57,7 @@
5757
},
5858
{
5959
"label": "Our library: materializeRichInlineLineRange()",
60-
"ms": 0.02750000059604645,
60+
"ms": 0.027499999850988388,
6161
"desc": "36 rich-text inline flow shared-corpus texts across widths 180/220/260px; range walker plus per-line materialization"
6262
},
6363
{
@@ -69,44 +69,44 @@
6969
"richPreWrapResults": [
7070
{
7171
"label": "Our library: measureLineStats()",
72-
"ms": 0.19000000059604644,
72+
"ms": 0.1924999997019768,
7373
"desc": "12 generated pre-wrap texts with 320 hard-break chunks across widths 220/260/320px; stats only"
7474
},
7575
{
7676
"label": "Our library: layoutWithLines()",
77-
"ms": 0.275,
77+
"ms": 0.2774999991059304,
7878
"desc": "12 generated pre-wrap texts with 320 hard-break chunks across widths 220/260/320px; materializes text lines"
7979
},
8080
{
8181
"label": "Our library: walkLineRanges()",
82-
"ms": 0.1449999988079071,
82+
"ms": 0.14249999970197677,
8383
"desc": "12 generated pre-wrap texts with 320 hard-break chunks across widths 220/260/320px; line ranges only, no line text strings"
8484
},
8585
{
8686
"label": "Our library: layoutNextLine()",
87-
"ms": 0.5825000002980232,
87+
"ms": 0.5800000011920929,
8888
"desc": "12 generated pre-wrap texts with 320 hard-break chunks across widths 220/260/320px; streaming line-by-line layout"
8989
}
9090
],
9191
"richLongResults": [
9292
{
9393
"label": "Our library: measureLineStats()",
94-
"ms": 1.0662499994039534,
94+
"ms": 1.0700000010430815,
9595
"desc": "8 Arabic long-form texts across widths 240/300/360px; stats only"
9696
},
9797
{
9898
"label": "Our library: layoutWithLines()",
99-
"ms": 3.54375,
99+
"ms": 3.619999999552965,
100100
"desc": "8 Arabic long-form texts across widths 240/300/360px; materializes text lines"
101101
},
102102
{
103103
"label": "Our library: walkLineRanges()",
104-
"ms": 1.4037500001490115,
104+
"ms": 1.4312500007450581,
105105
"desc": "8 Arabic long-form texts across widths 240/300/360px; line ranges only, no line text strings"
106106
},
107107
{
108108
"label": "Our library: layoutNextLine()",
109-
"ms": 3.4174999997019766,
109+
"ms": 3.4549999997019767,
110110
"desc": "8 Arabic long-form texts across widths 240/300/360px; streaming line-by-line layout"
111111
}
112112
],
@@ -121,8 +121,8 @@
121121
"breakableSegments": 0,
122122
"width": 300,
123123
"lineCount": 193,
124-
"analysisMs": 1.699999988079071,
125-
"measureMs": 2.4999999403953552,
124+
"analysisMs": 1.5999999642372131,
125+
"measureMs": 2.5,
126126
"prepareMs": 4.100000023841858,
127127
"layoutMs": 0.01399999976158142
128128
},
@@ -136,10 +136,10 @@
136136
"breakableSegments": 1,
137137
"width": 300,
138138
"lineCount": 380,
139-
"analysisMs": 3.300000011920929,
140-
"measureMs": 4.700000047683716,
141-
"prepareMs": 8.199999988079071,
142-
"layoutMs": 0.026500000059604643
139+
"analysisMs": 3.199999988079071,
140+
"measureMs": 5,
141+
"prepareMs": 8.100000023841858,
142+
"layoutMs": 0.02699999988079071
143143
},
144144
{
145145
"id": "ko-unsu-joh-eun-nal",
@@ -151,9 +151,9 @@
151151
"breakableSegments": 0,
152152
"width": 300,
153153
"lineCount": 428,
154-
"analysisMs": 1.899999976158142,
155-
"measureMs": 5.299999952316284,
156-
"prepareMs": 7.300000011920929,
154+
"analysisMs": 1.800000011920929,
155+
"measureMs": 5.000000059604645,
156+
"prepareMs": 7.099999964237213,
157157
"layoutMs": 0.05349999994039536
158158
},
159159
{
@@ -166,9 +166,9 @@
166166
"breakableSegments": 2,
167167
"width": 300,
168168
"lineCount": 332,
169-
"analysisMs": 1.4000000357627869,
170-
"measureMs": 4.100000023841858,
171-
"prepareMs": 5.600000023841858,
169+
"analysisMs": 1.300000011920929,
170+
"measureMs": 4.100000083446503,
171+
"prepareMs": 5.5,
172172
"layoutMs": 0.04
173173
},
174174
{
@@ -181,10 +181,10 @@
181181
"breakableSegments": 2,
182182
"width": 300,
183183
"lineCount": 626,
184-
"analysisMs": 5.100000023841858,
185-
"measureMs": 8.800000011920929,
186-
"prepareMs": 13.800000011920929,
187-
"layoutMs": 0.04199999988079071
184+
"analysisMs": 4.800000011920929,
185+
"measureMs": 8.100000023841858,
186+
"prepareMs": 13,
187+
"layoutMs": 0.040999999940395354
188188
},
189189
{
190190
"id": "zh-guxiang",
@@ -196,10 +196,10 @@
196196
"breakableSegments": 14,
197197
"width": 300,
198198
"lineCount": 375,
199-
"analysisMs": 3.100000023841858,
199+
"analysisMs": 2.899999976158142,
200200
"measureMs": 5.100000023841858,
201-
"prepareMs": 8.200000047683716,
202-
"layoutMs": 0.025999999940395355
201+
"prepareMs": 8,
202+
"layoutMs": 0.025499999821186066
203203
},
204204
{
205205
"id": "th-nithan-vetal-story-1",
@@ -211,10 +211,10 @@
211211
"breakableSegments": 8087,
212212
"width": 300,
213213
"lineCount": 1024,
214-
"analysisMs": 7,
215-
"measureMs": 5.300000011920929,
216-
"prepareMs": 12.300000011920929,
217-
"layoutMs": 0.059000000059604644
214+
"analysisMs": 6.700000047683716,
215+
"measureMs": 4.500000059604645,
216+
"prepareMs": 11.5,
217+
"layoutMs": 0.05950000017881393
218218
},
219219
{
220220
"id": "my-cunning-heron-teacher",
@@ -256,10 +256,10 @@
256256
"breakableSegments": 2916,
257257
"width": 300,
258258
"lineCount": 352,
259-
"analysisMs": 2.199999988079071,
259+
"analysisMs": 2,
260260
"measureMs": 2.700000047683716,
261-
"prepareMs": 4.899999976158142,
262-
"layoutMs": 0.025999999940395355
261+
"prepareMs": 4.800000011920929,
262+
"layoutMs": 0.02550000011920929
263263
},
264264
{
265265
"id": "km-prachum-reuang-preng-khmer-volume-7-stories-1-10",
@@ -271,10 +271,10 @@
271271
"breakableSegments": 3541,
272272
"width": 300,
273273
"lineCount": 591,
274-
"analysisMs": 4.599999964237213,
275-
"measureMs": 3.0000000596046448,
276-
"prepareMs": 8,
277-
"layoutMs": 0.056999999880790714
274+
"analysisMs": 4,
275+
"measureMs": 3.400000035762787,
276+
"prepareMs": 7.600000023841858,
277+
"layoutMs": 0.0575
278278
},
279279
{
280280
"id": "hi-eidgah",
@@ -286,10 +286,10 @@
286286
"breakableSegments": 4089,
287287
"width": 300,
288288
"lineCount": 653,
289-
"analysisMs": 3.300000011920929,
290-
"measureMs": 4.800000071525574,
289+
"analysisMs": 3,
290+
"measureMs": 5.200000047683716,
291291
"prepareMs": 8.300000011920929,
292-
"layoutMs": 0.044000000059604645
292+
"layoutMs": 0.04550000011920929
293293
},
294294
{
295295
"id": "synthetic-long-breakable-runs",
@@ -301,10 +301,10 @@
301301
"breakableSegments": 1540,
302302
"width": 300,
303303
"lineCount": 2860,
304-
"analysisMs": 5.699999988079071,
305-
"measureMs": 9.000000059604645,
306-
"prepareMs": 14.800000011920929,
307-
"layoutMs": 0.2744999998807907
304+
"analysisMs": 4.800000011920929,
305+
"measureMs": 8.000000059604645,
306+
"prepareMs": 13.100000023841858,
307+
"layoutMs": 0.275
308308
},
309309
{
310310
"id": "ar-risalat-al-ghufran-part-1",
@@ -316,10 +316,10 @@
316316
"breakableSegments": 18743,
317317
"width": 300,
318318
"lineCount": 2643,
319-
"analysisMs": 16.100000023841858,
320-
"measureMs": 28.999999940395355,
321-
"prepareMs": 44,
322-
"layoutMs": 0.1730000001192093
319+
"analysisMs": 14.399999976158142,
320+
"measureMs": 26.899999976158142,
321+
"prepareMs": 42.89999997615814,
322+
"layoutMs": 0.165
323323
}
324324
]
325325
}

0 commit comments

Comments
 (0)