Example with improved performance