Skip to main content

Joe Darcy - Project Coin: Taking a Break for Strings in Switch

Joe Darcy talks about Project Coin: Taking a Break for Strings in Switch:

The title="Project Coin: Anatomy of adding strings in switch to javac">initial way a string switch statement was implemented in JDK 7 was to desugar a string switch into a series of two switch statements, the first switch mapping from the argument string's hash code to the ordinal position of a matching string label followed by a second switch mapping from the computed ordinal position to the code to be executed...

Community: OpenJDK