using array in threads benchmark