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
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.

1 participant