optimization

optimizing performance (local array)