Difference between revisions of "LSL Script Efficiency"

From Second Life Wiki
Jump to navigation Jump to search
(Changed Titel.)
m (Stub)
Line 36: Line 36:
++a and a += 1 are equal in speed (they compile to the same bytecode). a++ is slower.
++a and a += 1 are equal in speed (they compile to the same bytecode). a++ is slower.
</div></div>
</div></div>
{{LSLC|Stub}}

Revision as of 15:02, 11 May 2007

What is Efficiency

PAGE UNDER CONSTRUCTION!


Efficiency is how long it takes to run a script.

There are many ways to speed up scripts, such as using ++a instead of a++.

Rules for posting

The following code snipit will allow testing of a function.

default {
  state_entry() {
    integer i = 0;
    while (i < 1) {
      ++a;
    }
  }
}

Efficiency

++a and a += 1 are equal in speed (they compile to the same bytecode). a++ is slower.