perf(bench): Used iter_batched
to clone widgets in setup function
#383
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replaced
Bencher::iter
byBencher::iter_batched
to clone the widget in the setup function instead of in the benchmark timing.See this PR for more information about
iter_batched
and its use.See #262 for the original
paragraph
implementation.See #368 for the original
block
implementation.New benches reports
Block
didn't really move, times were so low in the first place.Paragraph
saw increases of ~20% for 2048 lines and ~65% for 65000 lines. (new
is still very high but its only copying memory, not much we can do ..., maybe we should remove it too?)Block

Paragraph

PS : Not sure about the conventional commit type, feel free to edit