3 ms·
It evaluates its arguments once. That means min(expensive_calculation(x), expensive_calculation(y)) works how it reads. A compiler might be able to avoid this
by ctz 12y ago
It evaluates its arguments once. That means min(expensive_calculation(x), expensive_calculation(y)) works how it reads.
A compiler might be able to avoid this if it can prove expensive_calcluation is pure, but this is usually not done unless WPO is in play.