Your code is fast – if you're lucky
你的代码速度很快——如果你幸运的话
HN Points: 109 / 74 comments | Author: chrka | HN Discussion: item?id=48870799 | Source: tiki.li
Original Article
Recently, while I was working on an optimized Quicksort implementation, I came across a rather interesting quirk. Modern compilers (especially Clang) optimize loops using fast, branch-free instructions - provided you use the right programming style.
⋯ 继续阅读请登录会员 ⋯