Commit 2e17b6e
authored
Derive
`process_clusters` updated its `run_advance` accumulator only when it
encountered the next cluster. It therefore omitted the final cluster,
and a run containing one cluster reported zero advance.
Derive `ShapedRun::advance` from finalized `ClusterData::advance` values
instead. This makes cluster data the source of truth and removes the
parallel accumulator from `process_clusters`. Using finalized
`ClusterData::advance` values as the source of truth also respects
transformations applied while constructing clusters, such as stripping
newline glyph contribution.
Add a regression test for a one-cluster run.
## Performance
A repeated paired Tango comparison against `fed192a` found no
statistically significant regressions:
```text
Default Style - arabic 20 characters -0.74%
Default Style - latin 20 characters -0.06%
Default Style - japanese 20 characters -0.42%
Default Style - arabic 1 paragraph -0.60%
Default Style - latin 1 paragraph +0.21%
Default Style - japanese 1 paragraph -0.90%
Default Style - arabic 4 paragraph -0.65%
Default Style - latin 4 paragraph -0.44%
Default Style - japanese 4 paragraph -1.10%*
Styled - arabic 20 characters +0.22%
Styled - latin 20 characters -0.74%
Styled - japanese 20 characters +0.73%
Styled - arabic 1 paragraph +0.44%
Styled - latin 1 paragraph +0.15%
Styled - japanese 1 paragraph +0.30%
Styled - arabic 4 paragraph +0.52%
Styled - latin 4 paragraph +0.68%
Styled - japanese 4 paragraph -0.94%
```ShapedRun::advance from clusters (#706)1 parent fed192a commit 2e17b6e
1 file changed
Lines changed: 73 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
268 | | - | |
| 268 | + | |
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
| 279 | + | |
280 | 280 | | |
281 | | - | |
| 281 | + | |
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | | - | |
296 | | - | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
297 | 302 | | |
298 | 303 | | |
299 | 304 | | |
300 | 305 | | |
301 | 306 | | |
302 | | - | |
| 307 | + | |
303 | 308 | | |
304 | 309 | | |
305 | 310 | | |
| |||
364 | 369 | | |
365 | 370 | | |
366 | 371 | | |
367 | | - | |
| 372 | + | |
368 | 373 | | |
369 | 374 | | |
370 | 375 | | |
| |||
373 | 378 | | |
374 | 379 | | |
375 | 380 | | |
376 | | - | |
377 | 381 | | |
378 | 382 | | |
379 | 383 | | |
| |||
418 | 422 | | |
419 | 423 | | |
420 | 424 | | |
421 | | - | |
422 | 425 | | |
423 | 426 | | |
424 | 427 | | |
| |||
594 | 597 | | |
595 | 598 | | |
596 | 599 | | |
597 | | - | |
598 | | - | |
599 | 600 | | |
600 | 601 | | |
601 | 602 | | |
| |||
669 | 670 | | |
670 | 671 | | |
671 | 672 | | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
0 commit comments