f32489a5a8ffdb716f81d04a6a0f0cc83f41293e
'(float)"-nan"' doesn't return Indet in LSL: llOwnerSay(llList2CSV([(float)"-nan"])); // outputs "nan", not "-nan" Therefore, for the output to yield the correct result we have to use a different strategy to generate an indeterminate. We choose '(1e40*0)' which is shorter than the rest. Also, we don't output infinites as '(float)"[-]inf"' but alwas as '1e40' or '(float)-1e40' (or just '-1e40' if we're in globals).
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.li/lsl-pyoptimizer/
Description
Optimizes a LSL2 script, folding constants, removing unused code and more. Adds new syntax features too.
Languages
Python
73.5%
LSL
26.5%