BIS fnc codePerformance: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Generated by BIS_fnc_exportFunctionsToWiki)
 
m (Created page with "{{Function|= Comments ____________________________________________________________________________________________ | TKOH |= Game name |1.00|= Game version ____________________...")
Line 1: Line 1:
{{Function|= Comments
{{Function|= Comments
____________________________________________________________________________________________
____________________________________________________________________________________________


| tkoh |= Game name
| TKOH |= Game name


|1.00|= Game version
|1.00|= Game version
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>/*
| Measures how much time it takes to execute given expression. |= Description
 
Description:
Measures how much time it takes to execute given expression
 
Parameter(s):
_this select 0: STRING - tested expression
_this select 1 (Optional): ANY - Param(s) passed into code (default: [])
_this select 2 (Optional): NUMBER -  Number of cycles (default: 10000)
 
Returns:
NUMBER - avarage time spend in code execution [ms]
*/
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_codePerformance]]; --> |= Syntax
| [expression,(cycles)] call BIS_fnc_codePerformance; |= Syntax


|p1= |= Parameter 1
|p1= '''expression''': [[String]] - tested expression |=
|p2= '''cycles''' (Optional): [[Number]] - Number of cycles (default: 10000) |=


| |= Return value
| [[Nothing]] |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________
 
|x1= <code>testArray = [];
["testArray = testArray + [1];"] call BIS_fnc_codePerformance;
testArray = [];
["testArray [[set]] <nowiki>[</nowiki>[[count]] testArray,1];"] call BIS_fnc_codePerformance;
</code>
Compare two methods of adding elements into array|=


|x1= <code></code> |=
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 46: Line 39:


<h3 style="display:none">Bottom Section</h3>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Debug|{{uc:codePerformance}}]]
 
[[Category:Functions|{{uc:codePerformance}}]]
[[Category:Take_On_Helicopters:_Functions|codePerformance]]
[[Category:{{Name|tkoh}}: Functions|{{uc:codePerformance}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:codePerformance}}]]

Revision as of 09:28, 21 October 2011

Hover & click on the images for description

Description

Description:
Measures how much time it takes to execute given expression.
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[expression,(cycles)] call BIS_fnc_codePerformance;
Parameters:
expression: String - tested expression
cycles (Optional): Number - Number of cycles (default: 10000)
Return Value:
Nothing

Examples

Example 1:
testArray = []; ["testArray = testArray + [1];"] call BIS_fnc_codePerformance; testArray = []; ["testArray set [count testArray,1];"] call BIS_fnc_codePerformance; Compare two methods of adding elements into array

Additional Information

See also:
See also needed

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section