No description
Find a file
Sei Lisa 0808938894 Optimizations based on addition algebra for floats and integers
Float addition is commutative. Swap the constant to the left side if it's not there. This is a "cheap" version of a bigger change that is planned, to minimize stack usage as much as possible on savepoints.

Float addition is not associative, therefore we don't optimize e.g. 1 + (2 + float).

Integer addition is commutative and associative. If there's a constant, we swap it to the left side. If there's a chained summation of the form const + (const + expression), we apply associativity to turn it into (const + const) + expression and reoptimize.

This doesn't cover all possible cases. Expressions of the form (const + expr) + (const + expr) are not optimized. We need to flatten sums if we want to do the right thing here, but that's not yet implemented.

Get rid of some older code and TODOs that are no longer needed.
2018-06-07 23:57:21 +02:00
lslopt Optimizations based on addition algebra for floats and integers 2018-06-07 23:57:21 +02:00
.gitignore Yet another follow-up to 2f4f403 (lslcalc support) 2016-12-15 04:15:26 +01:00
builtins-unittest.txt Get rid of builtins.txt.dat by adding a parameter to the parser ctor. 2015-07-09 20:35:14 +02:00
builtins.txt New functions llName2Key() and llRequestUserKey() 2018-05-09 19:06:25 +02:00
COPYING Add copyright notices to all files, to prepare the program for release. 2015-03-05 23:18:41 +01:00
fndata.txt New functions llName2Key() and llRequestUserKey() 2018-05-09 19:06:25 +02:00
main.py Add --bom command-line option to prefix the script with a BOM 2018-05-11 22:37:09 +02:00
README.md Update link to point to lsl.blacktulip-virtual.com instead of lsl.project.zone 2018-01-18 15:41:28 +01:00
testfuncs.py Bump copyright year 2018-03-23 16:36:45 +01:00
testparser.py Fix test case that was broken since 2b14acc 2018-06-07 02:14:15 +02:00

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.blacktulip-virtual.com/lsl-pyoptimizer/