3 ms·
Didn't read the post ? THat is explicitly mentioned > Yes, yes, yes, you can use it in random places. It's not only some JSON parsing library, you'll find it i
by ilyt 4y ago
Didn't read the post ? THat is explicitly mentioned
> Yes, yes, yes, you can use it in random places. It's not only some JSON parsing library, you'll find it in other libraries too. I suspect the most use it gets in many situations is - drum roll - implementing memmove/strchr/strcmp style things. And in absolutely zero of those cases will it have been done by the compiler auto-vectorizing it.
- bluestreak 4y agoI couldn't agree more. I don't think compiler vectorization is that useful even for columnar (!) database we're building. The specialized JIT doesn't even use AVX512 because too much effort for little to no gain.
- sagarm 4y agoVectorization (auto or manual) can really help optimize bottlenecks like evaluating simple comparisons once you're out of easy algorithmic wins. It takes so much attention it's only worth doing in the most critical cases IMO. Auto-vectorization can be fragile. Manual vectorization is a ton of work and difficult to maintain.
- gumby 4y ago> And in absolutely zero of those cases will it have been done by the compiler auto-vectorizing it. How much of that is due to language semantics? Can't FORTRAN compilers make better use of the AVX instructions than, say, a C or Rust compiler could due to memory reference semantics?
- dan-robertson 4y agoIn theory, Rust should have much better memory semantics than C but currently much fighting is required to get llvm to take advantage of the Rust semantics.