Skip to content

cmd/compile: compile dense, pure-integer "switch" into jump table #5496

@cloneable

Description

@cloneable
Dense switch statements containing only integer cases can be compiled into a JMP table
to gain performance. 

Depending on the density threshold the code size might be similar or even smaller.

Base64: the character set spreads from 43 to 122 (= 80) ==> density of 80 % (good)

hex: 0-9a-fA-F = 48..102 = 55 ==> 40 % (probably too low)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions