What is the difference between std.math.min() and @minimum()?
I implemented a min() function that takes two Vector(4, f32) and saw in godbolt that it emits vminps so I was content. I later found out about @minimum() and tried it, because it could replace my own function.
To my surprise, in a non-trivial program, the performance actually improved!
I now went back to godbolt to compare the generated code and @minimum() generates a lot more instructions, and now I’m completely confused.
Any ideas what is going on here?
Consider also this example, where the generated code involving @minimum looks even longer compared to the “hand-written” version.