Skip to content

Comments

Don't clone params on benchmark hotpath#1253

Open
ludfjig wants to merge 1 commit intohyperlight-dev:mainfrom
ludfjig:bench_improve_hotpath
Open

Don't clone params on benchmark hotpath#1253
ludfjig wants to merge 1 commit intohyperlight-dev:mainfrom
ludfjig:bench_improve_hotpath

Conversation

@ludfjig
Copy link
Contributor

@ludfjig ludfjig commented Feb 24, 2026

Move the 50MB Vec and String clones out of the measured benchmark region for the large parameters benchmark by using iter_with_setup. Also replace unsafe from_utf8_unchecked with safe from_utf8 since this is setup code, not performance-critical.

This was bothering me when profiling #1241

Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
@ludfjig ludfjig added the kind/enhancement For PRs adding features, improving functionality, docs, tests, etc. label Feb 24, 2026
@ludfjig ludfjig marked this pull request as ready for review February 24, 2026 16:43
Copy link
Contributor

@dblnz dblnz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement For PRs adding features, improving functionality, docs, tests, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants