CommandHelper
CommandHelper copied to clipboard
Optimize array_contains functions
Improve runtime performance on array_contains(), array_scontains() and array_contains_ic() by iterating over the array values whenever possible, rather than creating a keyset to iterate over and calling the getter to get all values.
Running the same code, profiler results (where the profiler started at different points in time) do show a large difference in array_contains().
Before:
After: