BIS fnc codePerformance: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) (note about restart) |
No edit summary |
||
Line 20: | Line 20: | ||
|p1= '''expression''': [[String]] - tested expression |= | |p1= '''expression''': [[String]] - tested expression |= | ||
|p2= '''cycles''' (Optional): [[Number]] - Number of cycles (default: 10000) |= | |p2= '''Any''' (Optional): Param(s) - passed into code (default: []) |= | ||
|p3= '''cycles''' (Optional): [[Number]] - Number of cycles (default: 10000) |= | |||
| [[Nothing]] |= Return value | | [[Nothing]] |= Return value |
Revision as of 03:25, 31 March 2014
Description
- Description:
- Measures how much time it takes to execute given expression. Results may vary based on overall performance; use this function to compare alternative scripting approaches rather than to measure specific values. In Arma 3, window with results is opened afterwards. NOTE: For best results restart your client before conducting tests. This function uses diag_tickTime which loses its precision the longer the client runs from restart.
- Execution:
- call
- Groups:
- Uncategorised
Syntax
- Syntax:
- [expression,(cycles)] call BIS_fnc_codePerformance;
- Parameters:
- expression: String - tested expression
- Any (Optional): Param(s) - passed into code (default: [])
- 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