feat: add benchmark for converting enum string to enum constant #4

Merged
Ghost merged 0 commits from refs/pull/4/head into main 2025-07-28 23:29:28 +01:00
Ghost commented 2025-07-28 22:23:30 +01:00 (Migrated from codeberg.org)

Adds a benchmark to convert an Enum String to an Enum constant.

For example, "java.util.concurrent.TimeUnit.NANOSECONDS" to java.util.concurrent.TimeUnit#NANOSECONDS.

Benchmark                                 Mode  Cnt     Score   Error  Units
EnumStringToConstBenchmark.stringParsing  avgt       7122.947          ns/op
EnumStringToConstBenchmark.usingRegex     avgt       9006.940          ns/op
Adds a benchmark to convert an Enum String to an Enum constant. For example, `"java.util.concurrent.TimeUnit.NANOSECONDS"` to `java.util.concurrent.TimeUnit#NANOSECONDS`. ``` Benchmark Mode Cnt Score Error Units EnumStringToConstBenchmark.stringParsing avgt 7122.947 ns/op EnumStringToConstBenchmark.usingRegex avgt 9006.940 ns/op ``` ## Related * For https://github.com/apache/commons-beanutils/pull/49
Ghost commented 2025-07-28 22:43:12 +01:00 (Migrated from codeberg.org)

added 1 commit

  • 21ec4c73 - feat: add benchmark for converting enum string to enum constant

Compare with previous version

added 1 commit <ul><li>21ec4c73 - feat: add benchmark for converting enum string to enum constant</li></ul> [Compare with previous version](/SethFalco/java-microbenchmarks/-/merge_requests/4/diffs?diff_id=1439070729&start_sha=fdb922d53c55684c9d8215f2cd7d4347c0114101)
Ghost commented 2025-07-28 23:29:28 +01:00 (Migrated from codeberg.org)

mentioned in commit e205094768

mentioned in commit e2050947688cbb4838ad12b04a28da9d3c32fe18
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
SethFalco/java-microbenchmarks!4
No description provided.