In medical ultrasound imaging, high-performance beamforming is important to enhance spatial and contrast resolutions. A modern receive dynamic beamfomer uses a constant sound speed that is typically assumed to 1540 m/s in generating receive focusing delays , . However, this assumption leads to degradation of spatial and contrast resolutions particularly when imaging obese patients or breast since the sound speed is significantly lower than the assumed sound speed ; the true sound speed in the fatty tissue is around 1450 m/s. In our previous study, it was demonstrated that the modified nonlinear anisotropic diffusion is capable of determining an optimal sound speed and the proposed method is a useful tool to improve ultrasound image quality , . In the previous study, however, we utilized at least 21 iterations to find an optimal sound speed, which may not be viable for real-time applications. In this paper, we demonstrates that the number of iterations can be dramatically reduced using the GSS(golden section search) method with a minimal error. To evaluate performances of the proposed method, in vitro experiments were conducted with a tissue mimicking phantom. To emulate a heterogeneous medium, the phantom was immersed in the water. From the experiments, the number of iterations was reduced from 21 to 7 with GSS method and the maximum error of the lateral resolution between direct and GSS was less than 1%. These results indicate that the proposed method can be implemented in real time to improve the image quality in the medical ultrasound imaging.