BIS fnc codePerformance: Difference between revisions
Jump to navigation
Jump to search
Sarogahtyp (talk | contribs) mNo edit summary |
Killzone Kid (talk | contribs) (irrelevant info removed since this function is using engine command now) |
||
Line 7: | Line 7: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| 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. | | 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. Upon function execution, window with results is opened and timing is copied to clipboard. This functions is using [[diag_codePerformance]] command. | ||
[[File:BIS fnc codePerformance.png|300px]] | [[File:BIS fnc codePerformance.png|300px]] | ||
Line 44: | Line 40: | ||
<dl class="command_description"> | <dl class="command_description"> | ||
<!-- Note Section BEGIN --> | <!-- Note Section BEGIN --> | ||
<!-- Note Section END --> | <!-- Note Section END --> | ||
</dl> | </dl> |
Revision as of 11:40, 21 June 2017
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. Upon function execution, window with results is opened and timing is copied to clipboard. This functions is using diag_codePerformance command.
- Execution:
- call
- Groups:
- Uncategorised
Syntax
- Syntax:
- [expression(String),Any([parameters]),cycles(Number)] 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:
- diag_codePerformance
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