CommandHelper icon indicating copy to clipboard operation
CommandHelper copied to clipboard

Optimize array_contains functions

Open Pieter12345 opened this issue 9 months ago • 0 comments

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: afbeelding

After: afbeelding

Pieter12345 avatar Jan 17 '25 06:01 Pieter12345