Why std::min is twice as efficient as if comparison?

My issue

I run my code and found that using min to get the minimum of two values consumes less than half of time spent when using if comparison.

My code

include
using namespace std;

int main() {
int T;
cin>>T;
while(T–)
{
int N;
int min_si;
long long mx_sum=0;
cin>>N;
cin>>min_si;
mx_sum+=min_si;
for(int i=1;i<N;i++)
{
int tmp;
cin>>tmp;
if(tmp<min_si)
{
min_si=tmp;
}
mx_sum+=min_si;
}
cout<<mx_sum<<endl;
}
return 0;
}

Problem Link: https://www.codechef.com/problems/STUPMACH

@lijessen2016
Its depends upon the line of code u are writing .
if require more line of code than using min function.

I read many articles on google and asked chatGPT, the answer is that if logic is more efficient than min or max. But what surprised me most is that the replacement of if logic with min here cuts the time spent by half in this case.