2 ms·
It's really more about SIMD than about CISC or RISC. The pcmpxstrx family of instructions aren't like classical CISC string-compare instructions (though note th
by pcwalton 10y ago
It's really more about SIMD than about CISC or RISC. The pcmpxstrx family of instructions aren't like classical CISC string-compare instructions (though note that those are there too—"repe cmps"). Rather, they take 16-byte registers and perform operations (find first byte matching X, etc) on the bytes in them. I imagine that they can take advantage of effectively map-reduce style techniques for this (which is what you would do in software too if you were using simpler SIMD instructions).
Note that pcmpxstrx isn't really that fast in many cases compared to just doing ordinary SIMD operations.
- stcredzero 10y agoThe string compare operations built into old CISC architectures also weren't that fast. It's more like they were designed as bullet points for the salesmen. (Who were talking to execs who remember managing people who wrote things in assembly.)