Commit 59f054d9 authored by Zheng Xu's avatar Zheng Xu Committed by Mark Mendell
Browse files

ART: Reduce the instructions generated by packed switch.

Implement Vladimir Marko's suggestion. The new compare/jump series
reduce the number of instructions from (2*n+1) to (1.5*n+3).

Generate normal compare/jump series when numEntries <= 3.
Generate optimal compare/jump series when numEntries <= threshold.
Generate jump tables otherwise.

Change-Id: I425547b6787057c7fa84e71f17c145b63b208633
parent 763fd2d3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment