News for hackers. Stuff that matters.
Re:Is Prefix of String in Table? a Journey into SIMD String... by gameswithgo on Monday May 14, 2018 @02:56PM (#17068357)
On benefit of sticking with 16 bytes is it work on any 64bit machine, and as well you don't run into weird throttling issues that you do with AVX/AVX2/AVX512

So it is a lot easier to make something general purpose, where almost anyone can use it and it will always be faster.

With AVX you sometimes have to take some care.

Re:Is Prefix of String in Table? a Journey into SIMD String... by dragontamer on Monday May 14, 2018 @03:07PM (#17068457)
He's using the "v" instructions, which requires AVX, and probably AVX2 (I haven't memorized all the instructions... but they're at least AVX). Even if he sticks with 16-bytes, the use of the "v" instructions basically requires a relatively recent processor.
Re:Is Prefix of String in Table? a Journey into SIMD String... by trentnelson on Monday May 14, 2018 @03:12PM (#17068501)
Yeah it's actually a pretty inconsistent mish-mash of ISA usage. I could go straight SSE4.x but I'd lose out on the vp* goodies you get with AVX and AVX2, even if I'm only using XMM registers.

The "length of 16, num elements is 16" parity is nice though and simplifies the logic of the algorithm.

Re:Is Prefix of String in Table? a Journey into SIMD String... by trentnelson on Monday May 14, 2018 @03:15PM (#17068523)
Yeah I generally agree with regards to throttling/caps/license issues, especially re: AVX-512. AVX and AVX2 aren't too bad though. I'm not using computationally-intensive AVX instructions, just your standard vectorized and/not/or/test/cmp/gt etc. These are incredibly cheap from a CPU cycle perspective.