Skip to content

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

@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
dblnz
dblnz previously approved these changes Feb 25, 2026
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!

Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
@ludfjig ludfjig force-pushed the bench_improve_hotpath branch from 4e51e3b to da4c9ca Compare February 25, 2026 19:08
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.

3 participants