≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Does ammount of functions affects the optimization of behavior?
Posted by:
(you are not logged in)
Enter the missing letter in: "Internation?l"
(you are not logged in)
Text:
[quote][b]csp-games[/b] wrote: Calling a function has a tiny impact because the JS interpreter must put the parameters on a stack, also put the return address on a stack, then branch to the function, and at the end, read the return address from the stack and jump back to the line after the function call. So something like: function min(a,b) { if(a<b) return a; return b; } may be handy, but it also makes execution slower, and if you call this in a loop a thousand times, it may become noticeable. Generally speaking, too many calls, esp. ccb commands such as Linepicks, can slow things down a lot, esp. in the WebGL target, but also on the other platforms, because it will also be interpreted, and not compiled. Always try to keep it simple.[/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact