News for hackers. Stuff that matters.
Re:Unsigned comparisons in AVX2/SSE: a quick note by moonchild on Friday August 26, 2022 @05:47AM (#32605218)
That's unfortunate. The solution with min actually does equal work in this case--it just has a lesser startup cost, hence my mention of a 'hostile environment'--but with greater span, because the high-bit toggling can be done for both inputs in parallel. If you switch to a loop, at the very least, it ought to use the traditional solution, but it doesn't. Also it doesn't use the trick with the saturating subtract. https://godbolt.org/z/76qKs49eW

There are no comments on this comment yet.