Wandering Soulstar Posted March 22, 2019 Share Posted March 22, 2019 (edited) While having my morning coffee I was browsing around the Wiki, as one does, and came across THIS PAGE from @Omei Qunhua that I had not seen before. The really interesting section for me came at the bottom: Quote Auto-casting of integers to floats (Mono) llSetTimerEvent(0) is 3 bytes shorter than llSetTimerEvent(0.0) llSetText(message, <1, 1, 1>, 1) is 12 bytes shorter than llSetText(message, <1.0, 1.0, 1.0>, 1.0) Adding single items to a list (Mono) For ByteCode space-saving, don't form the new item into a list itself before adding. example: list MyList; MyList += "a"; is 10 bytes shorter than MyList += ["a"]; MyList += 1; is 15 bytes shorter than MyList += ; 15 byte savings also apply when adding floats, vectors and rotations. Counter intuitive, but good to know and something to take into account I would think. Also was intrigued by the last statement: Quote I've just developed a means of storing an avatar key losslessly in a quarternion, with help from work by Strife and Pedro. So that gives the chance to hold keys accurately in a list at just 28 bytes per key. Watch this space! Since the wiki page has not been updated since May of 2014 .. would be very interested in seeing what came of this ... Omei, @Strife Onizuka, Pedro .... are you there? Edited March 22, 2019 by Wandering Soulstar Added link Link to comment Share on other sites More sharing options...
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now