[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Lua 5.4.0 (work2) now available
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 13 Aug 2018 14:01:49 -0300
> Lua 5.4 optimize small constant integer ADD by OP_ADDI , and a bit slower
> for big constants.
> You can change those big integers to small one and test again, you will
> find much faster.
That is correct. When choosing the new opcodes, we did some measures of
occurrences of some kinds of operands for some operations over a big
corpus of Lua files. We found that occurrences of additions with "big"
integer constants (actually anything larger than 2) and additions with
any float constant are very rare and therefore it is not worth to have
specific opcodes for those cases.
If these hypotheses are wrong, we will be happy to learn about and
rework our set of opcodes.