perf(MergedText): if all chunks are merged, just concatenate them all #285

Merged
ada4a merged 1 commit from ada4a/mergiraf:merged_text_render_all_merged into main 2025-03-22 11:56:42 +01:00
Owner

I'd say this scenario is realistic in practice, since sometimes we do manage to solve all the conflicts.

This is my first perf commit to use criterion, and the results are quite impressive :)

MergedText/early-return/compact
                        time:   [384.24 ns 385.19 ns 386.23 ns]
                        change: [-98.397% -98.364% -98.332%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 6 outliers among 100 measurements (6.00%)
  4 (4.00%) high mild
  2 (2.00%) high severe
MergedText/early-return/line_based
                        time:   [394.09 ns 395.57 ns 397.52 ns]
                        change: [-23.201% -22.035% -20.748%] (p = 0.00 < 0.05)
                        Performance has improved.

I would be glad to attach the benchmark to the PR, but it was done in a somewhat hacky way -- since the benchmarks are compiled as external packages, I needed to make a bunch of stuff public so that they could access it

I'd say this scenario is realistic in practice, since sometimes we do manage to solve all the conflicts. This is my first `perf` commit to use criterion, and the results are quite impressive :) ``` MergedText/early-return/compact time: [384.24 ns 385.19 ns 386.23 ns] change: [-98.397% -98.364% -98.332%] (p = 0.00 < 0.05) Performance has improved. Found 6 outliers among 100 measurements (6.00%) 4 (4.00%) high mild 2 (2.00%) high severe MergedText/early-return/line_based time: [394.09 ns 395.57 ns 397.52 ns] change: [-23.201% -22.035% -20.748%] (p = 0.00 < 0.05) Performance has improved. ``` I would be glad to attach the benchmark to the PR, but it was done in a somewhat hacky way -- since the benchmarks are compiled as external packages, I needed to make a bunch of stuff public so that they could access it
perf(MergedText): if all chunks are merged, just concatenate them all
All checks were successful
/ test (pull_request) Successful in 57s
8ff7e045a6
wetneb approved these changes 2025-03-22 10:35:20 +01:00
ada4a merged commit f9d9504123 into main 2025-03-22 11:56:42 +01:00
ada4a deleted branch merged_text_render_all_merged 2025-03-22 11:56:43 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: mergiraf/mergiraf#285
No description provided.