perf script: use ARRAY_SIZE instead of reinventing it