[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: how does lua arrange vmcase?
- From: "Soni L." <fakedme@...>
- Date: Tue, 4 Apr 2017 12:55:45 -0300
On 2017-04-04 12:51 PM, Xianfu Pan wrote:
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.
Linear?
It should be O(1) (aka constant), not O(n) (aka linear)...
--
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.