请问 (如果) (分支判断) 语句的差异
本帖最后由 xuwanbin 于 2022-11-19 12:10 编辑:D好好学习天天向上
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJcAAAB+CAYAAAAp1IMzAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAqpSURBVHhe7Zw9riXHDYVHghcwq5hYsQCnxoRawQgKHftvDf5RrFDQrEDhQKkBxd6RrWPcYx8RZBV5u3nv6wd+QKGrWCxWVfOg70NP13z27t27f78ZhgY+v12H4XRGXEMbI66hjbK4vvjzj7fac/j48eOt9n+szfMhUV/V7gFfLZ6N9kfx3W+//9UV2LpXVuz6AXx+c6u3kBHiv/721a22B4n58OHD/+rKqs0xAHWNA2w7ws4B7Di26avtzByP4Pf//Oa/yceVbcWKR309ov7D4vIEpILROnxt+140UVmxqDi0DtheCSAjDhsXROvphkn3kq9tK6ajcL70q4hIRJ5g2M6IR8euqCRIE6xjbIxVW2OAzNx2POo2DsjEehSe8Kyt2ibpJ5cVUkY4IBIeyMbw8JJGVsmz46I4GZEQnc/z2/UrP/7l61stx1d//eFWywEhEApCbRHWJzOm9W8uYAV0RFAKE25FQGybrHxs4rVdjW2JxliqYqniCQo2tKOnkdqB9Y1oFZf9ybNPrqMgWUya1leJRJ9i2x6reCQTJ0P3kytCBZYVz460uFQYGZFETyjPfkRwXtIjIVj7ToToUx/rr+3IjnqF7idXRCSsrNA8v7v/5tqhfhxnrxWQrEzSPDvHekT+nGeFtyZbVx/tf0moMDyB3UvpJeo9wvD8GecITByT5V1tvy0ru6UqDPrqOFzRfmmcISSPkrj0yaOgzULYjoTIODpmh5ccL+kdSbRzkMhOvLU9Gz6ZoieUtcFPS2SzlN5zqVDYjuweq74qFI8mywrN81E8YVqyMenH/hW7OTuBEFQ8kTBA5Ylm44L5nmtoY76KGNoYcQ1tjLiGNkZcQxsjrqGNEdfQxohraGPENbRx6EvUiMpb+Opbe++tuvcWPXoLHvVV7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rhLAVEa0QwlZEtEIIWxHRCiFsRUQrhLAVEa0QwlZEtEIIWxHRCiFsRUQrhLAVEa0QwlZEtEIIW/GW/zXNDPnva0K4J28nWiGEMCJfD0MIWxHRCiFsRUQrhLAVEa0QwlY8LVr5IXwI4TPJnVYIYSO+fftfAJr2k8k6DhQAAAAASUVORK5CYII=
刚才也去看了下官方文档 如果语句相当于易语言的判断这也是易语言使用最多的流程控制语句
可是为什么还有分支判断这个语句
在C++内这个语句有什么不同吗?或者特殊情况下这个执行效率更高
理论上来说分支快,因为分支只能判断整数,如果是所有类型都可以判断,如果可能内部会解析类型,个人理解 想用哪个用哪个 几乎没差别,除非是异常苛刻的高精度速度要求 正常来说低于4-5个的判断用如果否则,超过的就用分支判断,如果特别多的就做跳转表,,,,比如,内核的ssdt系统服务表,有几百个函数,不可能做几百个如果否则吧,说到底还是为了效率。。。 如果根据逻辑值来进行操作
分支 基本上是确定数值了
乐易论坛 发表于 2022-11-20 12:24
如果根据逻辑值来进行操作
分支 基本上是确定数值了
可是分支看起来不如如果一目了然 如果否则就是 if、else、else if
会按顺序判断,一旦条件达成就不再执行下面的判断,但如果条件很多,恰好也在最尾,那就会判断多次
分支判断是 switch,会根据提供的值直接跳到支持的分支,只需要判断一次
结论上来看,简单的整数判断,5个条件内是如果否则快,超过5个是分支判断快 其实这就好比..数组的索引...
如果:循环(0,数组.取成员数(),i){
如果(i==5){ 数组.取成员(i)
}
}
分支:数组.取成员(5)
一次定位,和多次判断定位的区别
超过一定上限,用如果会进入到C++的一个坑,编译会报错,具体报啥不记得了,先前有遇到过。
用分支就不会有这个问题,特别是主窗口里的菜单,5个以上直接用分支吧。
页:
[1]
2