我只是想在C/C++中的两个语句之间有任何性能差异:
情况1:
if (p==0)
do_this();
else if (p==1)
do_that();
else if (p==2)
do_these():
Run Code Online (Sandbox Code Playgroud)
案例2:
if(p==0)
do_this();
if(p==1)
do_that();
if(p==2)
do_these();
Run Code Online (Sandbox Code Playgroud)