Difference between revisions of "LSL Script Efficiency"
Jump to navigation
Jump to search
Line 4: | Line 4: | ||
<div id="box"> | <div id="box"> | ||
<div style="padding: 0.5em 0.5em 1.5em"> | <div style="padding: 0.5em 0.5em 1.5em"> | ||
Efficiency is how long it takes to run a script. For example, it is faster to do <i>integer a = 3.1415926535 </i> than <i> integer a = PI. </i> | Efficiency is how long it takes to run a script. For example, it is faster to do <i>integer a = 3.1415926535 </i> than <i> integer a = PI. </i> This is because it takes to computer time to determine the value for PI, and then set it to a. | ||
For a similar reason, there are many random ways to speed up scripts, such as using ++a instead of a++. | |||
Revision as of 12:22, 3 April 2007
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
What is Efficiency
Efficiency is how long it takes to run a script. For example, it is faster to do integer a = 3.1415926535 than integer a = PI. This is because it takes to computer time to determine the value for PI, and then set it to a.
For a similar reason, there are many random ways to speed up scripts, such as using ++a instead of a++.
Rules for posting
What to post
Things that are faster
++a is the fastest then there is a += 1 finally a++