BIS fnc codePerformance: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " \| *(x[0-9]|p[0-9]{1,2}|descr|game[0-9]|version[0-9]|s[0-9]|exec|r[0-9]|arg|eff|branch|serverExec|gr[0-9]|mp|pr|seealso) +=" to " |$1=") |
Lou Montana (talk | contribs) m (Text replacement - " \| *(\[[a-zA-Z,. ]*\] call ('''|\[\[)?BI(N|S)_fnc_[a-zA-Z]+('''|\]\])?) * \|p1=" to " |s1=$1 |p1=") |
||
Line 12: | Line 12: | ||
Keep in mind that this takes string, and that you can't pass <code>[[str]] _code</code> as string because that add's curly braces to the string. | Keep in mind that this takes string, and that you can't pass <code>[[str]] _code</code> as string because that add's curly braces to the string. | ||
| [expression, arguments, cycles, display] call [[BIS_fnc_codePerformance]] | |s1=[expression, arguments, cycles, display] call [[BIS_fnc_codePerformance]] | ||
|p1= expression: [[String]] - Tested expression | |p1= expression: [[String]] - Tested expression |
Revision as of 16:57, 12 June 2021
Description
- Description:
- Description needed
- Execution:
- call
- Groups:
- Diagnostic
Syntax
- Syntax:
- [expression, arguments, cycles, display] call BIS_fnc_codePerformance
- Parameters:
- expression: String - Tested expression
- arguments (Optional): Anything - Arguments to pass into the code. Default: []
- cycles (Optional): Number - Number of wanted cycles. Default: 10000
- display (Optional): Display - Display in which the message window with results will be opened. Use displayNull to disable the window. Default: Current mission display
- Return Value:
- Number - Average execution time of the expression
Examples
- Example 1:
testArray = []; ["testArray = testArray + [1]"] call BIS_fnc_codePerformance; testArray = []; ["testArray set [count testArray, 1]"] call BIS_fnc_codePerformance; testArray = []; ["testArray pushBack 1"] call BIS_fnc_codePerformance;
Compare three 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