[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: how does lua arrange vmcase?
- From: Xianfu Pan <pxfgod@...>
- Date: Tue, 4 Apr 2017 23:51:33 +0800
AFAIK, cases are sensitive of orders in C language. switch (?) case XXX:break; case YYY:break;
vmcase(OP_MOVE) is before vmcase(OP_LOADK) before vmcase(OP_LOADKX) then vmcase(OP_LOADBOOL) followed?
why such order? frequency order? or any other considerations?
lua_execute is hot point of lua performance. if of frequency considerations, I guess, why not write a Huffman tree's binary search instead of vmcase's linar search?
best regards to all.