Skip to content

Add performance-focused JMH benchmark - #922

Merged
snazy merged 2 commits into
projectnessie:mainfrom
snazy:jmh-perf
Jul 21, 2026
Merged

Add performance-focused JMH benchmark#922
snazy merged 2 commits into
projectnessie:mainfrom
snazy:jmh-perf

Conversation

@snazy

@snazy snazy commented Jul 20, 2026

Copy link
Copy Markdown
Member

No description provided.

@snazy
snazy requested a review from XN137 July 20, 2026 10:07
XN137
XN137 previously approved these changes Jul 21, 2026
return;
case "all":
program = program("items.all(i, i >= 0)");
vars = mapOf("items", list(size), "target", (long) size - 1);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

target is unused in the expression

}

@Benchmark
public void enumConversion(Blackhole blackhole) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

are we intentionally including registry creation and enum registration in this benchmark?
these parts are already covered in registerEnum and probably much more "expensive" than the conversion itself?


@Benchmark
public void registerType(Blackhole blackhole) {
Jackson3Registry registry = (Jackson3Registry) Jackson3Registry.newRegistry();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should we measure registry creation separately and then exclude it from the individual operation benchmarks?

case "mapLookupMiss":
program =
protoProgram(
"msg.map_string_uint64[key] == target",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

pardon my ignorance: does this run into an error or evaluate to False?

@snazy
snazy merged commit af79e1a into projectnessie:main Jul 21, 2026
3 checks passed
@snazy
snazy deleted the jmh-perf branch July 21, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants