4 ms·
IIRC Dalvik, when it launched, used a pretty fancy computed goto which computed the destination address without a table. It worked something like this: each cas
by klodolph 6y ago
IIRC Dalvik, when it launched, used a pretty fancy computed goto which computed the destination address without a table. It worked something like this: each case was given four instructions, so you could compute the address of the case with a shift+add. If a case needed more than four instructions, it would just use one of those to jump.