Changing Vector to Array to avoid boxing