Skip to content

when using a constant value when case when checking values... 0.0B/op appears. #1

@girng

Description

@girng

This seems weird, when constant values are enabled for case when checking (example):

cmd = CMD.from_value 5

instead of

cmd = CMD.from_value CMD_INDEX_VALUES.shuffle[0]

the Benchmark will report:

  case_when_enum 446.48M (  2.24ns) (± 2.90%)  0.0B/op        fastest
case_when_string 440.04M (  2.27ns) (± 4.04%)  0.0B/op   1.01× slower

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions