mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
No description
For floats: When const >= function.max, comparisons of function > const always yield FALSE. When const < function.min, comparisons of function > const always yield TRUE. When const > function.max, comparisons of function < const always yield TRUE. When const <= function.min, comparisons of function < const always yield FALSE. For integers: When min = -1, cond(function > -1) is the same as cond(!~function). When min = -1, cond(function < 0) is the same as cond(~function). To implement the above, we got rid of the cond(x < 0) -> cond(x & 0x80000000) optimization, which has caused more trouble than it has solved for just 1 byte gain. When min = 0, cond(function > 0) is the same as cond(function). When min = 0, cond(function < 1) is the same as cond(!function). Similar expressions can be obtained for max in [-1, 0], but it's not worth it, as there are no functions with -1 as maximum, and the ones with max=0 also have min=0 (always return 0). |
||
---|---|---|
lslopt | ||
.gitignore | ||
builtins-unittest.txt | ||
builtins.txt | ||
COPYING | ||
fndata.txt | ||
main.py | ||
README.md | ||
testfuncs.py | ||
testparser.py |
LSL PyOptimizer
LSL PyOptimizer is a LSL2 script optimizer written in Python 2. Currently it only supports code memory optimization (no speed optimization), only for Mono (no LSO), and only for the Second Life flavour of LSL (no OpenSim etc.).
HTML introduction, list of features and documentation available at http://lsl.project.zone/lsl-pyoptimizer/