google/highway
View on GitHub ↗ ★ 5,952 C++
Performance-portable, length-agnostic SIMD with runtime dispatch
107 mentions on Hacker News by 37 people: 7 stories, 100 comments · first 2020-08-04 · latest 2026-09-25
20082026
-
…GFNI for bit reversal and 8-bit shifts, and I just extended that to our 8-bit BroadcastSignBit ( https://github.com/google/highway/pull/1784 ).
comment by janwas · 2023-09-27 · in Permuting Bits with GF2P8AFFINEQB -
…en.cppreference.com/w/cpp/experimental/simd/simd ), Eve ( https://github.com/jfalcou/eve ), Highway ( https://github.com/google/highway ), Vc ( https://github.com/VcDevel/Vc )...
comment by jcelerier · 2023-08-19 · in Stable Diffusion in C/C++ -
You could study Google's Highway library [1]. [1] https://github.com/google/highway
comment by utopcell · 2023-07-07 · in {n} times faster than C -
…frequency reduction? Not since the first implementation on Skylake, and even there a non-issue, see https://github.com/google/highway/blob/master/hwy/contrib/so... . More cores? The shared-memory fabric is already bursting at the seams…
comment by janwas · 2023-06-24 · in Intel Releases x86-SIMD-sort 2.0 With Faster AVX-512 Sorting, New Algorithms -
…rare nor hard, it's a few dozen lines of boilerplate. You can even write your code just once: see https://github.com/google/highway#examples .
comment by janwas · 2023-06-24 · in AMD EPYC 97x4 “Bergamo” CPUs: 128 Zen 4c CPU Cores for Servers, Shipping Now -
Cool that you started with SIMD :) FYI github.com/google/highway allows you to write your code once and target many instruction sets. It also fills in many of the gaps, including reductions. Disclosure: I am the main author.
comment by janwas · 2023-06-20 · in The least interesting part about AVX-512 is the 512 bits vector width -
…a net win for data sizes >= 100 KiB. - Startup overhead is a non-issue on Icelake and AMD Zen4. 1: https://github.com/google/highway/blob/master/hwy/contrib/so...
comment by janwas · 2023-06-12 · in 10~17x faster than what? A performance analysis of Intel' x86-SIMD-sort(AVX-512) -
…a net win for data sizes >= 100 KiB. - Startup overhead is a non-issue on Icelake and AMD Zen4. 1: https://github.com/google/highway/blob/master/hwy/contrib/so...
comment by janwas · 2023-06-11 · in A performance analysis of Intel x86-SIMD-sort (AVX-512) -
…vqsort README says it is a non-issue on that generation CPU (Skylake-X) based on their benchmarks: https://github.com/google/highway/tree/master/hwy/contrib/so... At least on their low clock speed server CPU (<=3GHz), downclocking was hard…
comment by celrod · 2023-06-11 · in A performance analysis of Intel x86-SIMD-sort (AVX-512) -
Happy to discuss, preferably via issue on github.com/google/highway, would you like to open one?
comment by janwas · 2023-06-09 · in The Case of the Missing SIMD Code -
…count. [1] https://github.com/simd-everywhere/simde [2] https://github.com/ermig1979/Simd [3] https://github.com/google/highway [4] https://gitlab.com/libeigen/eigen [5] https://github.com/shibatch/sleef
comment by wyldfire · 2023-06-09 · in The Case of the Missing SIMD Code -
…referring to function multiversioning, but that only helps choose/call the implementation, not generate it. github.com/google/highway supports compiling your single source code once into several versions, and then dispatching to the best…
comment by janwas · 2023-06-05 · in Vectorization: Introduction -
…faster than this when running on AVX-512. Disclosure: I am the main author; happy to discuss. 0: https://github.com/google/highway/blob/master/hwy/contrib/so...
comment by janwas · 2023-05-31 · in AVX512 intrinsics for JDK’s Arrays.sort methods -
…be as verbose and cryptic as intrinsics; wrapper functions can help a lot :) Is this more readable? https://github.com/google/highway/blob/master/hwy/contrib/so...
comment by janwas · 2023-05-31 · in AVX512 intrinsics for JDK’s Arrays.sort methods -
Here is an example on how to do this using github.com/google/highway: https://gcc.godbolt.org/z/zP7MYe9Yf You write the code only once and do not have to worry about any #pragma/conditional compilation. Just copy-paste about a dozen lines…
comment by janwas · 2023-05-16 · in Please do not require AVX support for your software -
…all of those things except first-fault loads in a cross-platform way at reasonable cost in https://github.com/google/highway . If any of those is the one missing piece that's preventing you from vectorizing, then it's totally worthwhile to…
comment by janwas · 2023-05-06 · in Ask HN: Why are there no traditional language compilers that target the JVM? -
…to allow reordering (e.g. Highway's ReorderWidenMulAccumulate [1]), it's only 2 instructions. 1: https://github.com/google/highway/blob/master/g3doc/quick_re...
comment by janwas · 2023-05-02 · in SIMD with Zig -
Benchmark results using vqsort's bench_sort on Skylake workstation (patch: https://github.com/google/highway/pull/1140 ) vqsort is about 1.9x and 1.8x as fast on 1M keys and 100M uniform random keys, respectively. Note that this code did…
comment by janwas · 2023-02-17 · in Intel Publishes Fast AVX-512 Sorting Library, 10~17x Faster Sorts in NumPy -
…algorithm beyond what is described in our paper, e.g. special handling for 1..3 unique keys, see https://github.com/google/highway/blob/master/hwy/contrib/so... .
comment by janwas · 2023-02-16 · in Intel Publishes Fast AVX-512 Sorting Library, 10~17x Faster Sorts in NumPy -
…be interesting to see it benchmarked against the highway qsort[1] Google published last year. [1] https://github.com/google/highway/tree/master/hwy/contrib/so...
comment by posnet · 2023-02-15 · in Intel Publishes Fast AVX-512 Sorting Library, 10~17x Faster Sorts in NumPy -
…) Could also be interesting for you to run the vqsort benchmark: https://github.com/google/highway/blob/master/hwy/contrib/so...
comment by janwas · 2023-01-12 · in Efficient and performance-portable vector software -
▲ 98
Efficient and performance-portable vector softwarestory by signa11 · 2023-01-10 · 30 comments
-
It would be simpler to use the portable intrinsics from github.com/google/highway (disclosure: I am the main author). You include a header, and use the same functions on all platforms; the library provides wrapper functions which boil down…
comment by janwas · 2023-01-06 · in Transcoding Unicode with AVX-512: AMD Zen 4 vs. Intel Ice Lake -
…use 256 or 512-bit SIMD. You might give our vqsort a try, it's quite a bit faster than std::sort: https://github.com/google/highway/blob/master/hwy/contrib/so...
comment by janwas · 2022-12-18 · in Sorting with SIMD -
…one general all-to-all permute which is more expensive than two simple shuffles). Also, vqsort ( https://github.com/google/highway/tree/master/hwy/contrib/so... ) almost entirely consists of operations not supported by the extensions, and…
comment by janwas · 2022-12-08 · in Optimizing compilers reload vector constants needlessly -
…checked, it also only worked in a recent version of GCC. We do indeed have cross-platform intrinsics here: github.com/google/highway. Disclosure: I am the main author.
comment by janwas · 2022-12-07 · in Optimizing compilers reload vector constants needlessly -
Here's a first draft, comments welcome: https://github.com/google/highway/pull/1078 .
comment by janwas · 2022-12-06 · in AVX 512 will be the future -
…some distributions. It's useful both for sorting networks and quicksort partitioning. Code here: https://github.com/google/highway/tree/master/hwy/contrib/so... (disclosure: I'm one of the co-authors).
comment by janwas · 2022-12-03 · in Blitsort: A fast, in-place stable hybrid merge/quick sort -
▲ 2
Highway: Performance-portable, length-agnostic SIMD with runtime dispatchstory by kristianp · 2022-11-29 · 0 comments
-
https://github.com/google/highway
comment by kristianp · 2022-11-29 · in AVX 512 will be the future -
…to be a collection of prewritten kernels, so it only helps if the function you want to write is among them. github.com/google/highway seems to be closer to what is requested here. It provides around 200 portable intrinsics using which you…
comment by janwas · 2022-11-28 · in AVX 512 will be the future -
Good news, you can use portable intrinsics (github.com/google/highway) and write your code only once. (Disclosure: I am the main author.)
comment by janwas · 2022-09-15 · in Escaping strings faster with AVX-512 -
:) For anyone interested, here's a brief discussion of tail handling: https://github.com/google/highway#strip-mining-loops (Overlapping is indeed cool where it works - idempotent operations.)
comment by janwas · 2022-09-15 · in Escaping strings faster with AVX-512 -
…yet clear whether the compiler will be smart enough to (peephole-?)optimize away the duplicates. 1: https://github.com/google/highway/blob/master/g3doc/instruct...
comment by janwas · 2022-09-02 · in Filtering a vector with SIMD instructions (AVX-2 and AVX-512) -
Indeed a nice speedup! As to libraries: I'm the main author of github.com/google/highway which provides 'portable intrinsics' so you only have to write your code once for all platforms. It includes ready to use sorting and searching…
comment by janwas · 2022-09-01 · in Filtering a vector with SIMD instructions (AVX-2 and AVX-512) -
github.com/google/highway is arguably such a collection of tricks, the x86_256-inl.h header does emulate some missing AVX-512 instructions such as this one or compressstoreu. (In this case we currently use a constant.)
comment by janwas · 2022-08-26 · in Unsigned comparisons in AVX2/SSE: a quick note -
…may be possible to use unaligned loads/stores to handle the fringe in a single (final) iteration: https://github.com/google/highway#strip-mining-loops It is actually feasible to write vector-style code using SIMD instructions. Yes, the…
comment by janwas · 2022-06-28 · in tolower() in bulk at speed -
…good solution when you can arrange it. In Highway we also use the blending/bit-select you mention: https://github.com/google/highway/blob/master/hwy/ops/generi... If HWY_MEM_OPS_MIGHT_FAULT, which is true if using ASAN or AVX2 (because AMD…
comment by janwas · 2022-06-28 · in tolower() in bulk at speed -
…SVE will enable (properly written) software to benefit from future wider vectors without even recompiling. github.com/google/highway (disclosure: I am the main author) lets you write your code only once, and target newer instructions…
comment by janwas · 2022-06-12 · in Apple M2 Die Shot and Architecture Analysis – Big Cost Increase and A15 Based IP -
Response here because I'm not on Twitter: https://github.com/google/highway/issues/736 In short, what is being compared is O(1) djbsort sorting network, vs our full quicksort with pivot sampling, partitioning, then sorting network. This is…
comment by janwas · 2022-06-07 · in Vectorized and performance-portable Quicksort -
…along the same lines, what can people do (or rather, what do you do) about situations like this: https://github.com/google/highway/blob/master/hwy/examples/b... where things might get better in the future but for now we have to implement…
comment by nickysielicki · 2022-06-04 · in Vectorized and performance-portable Quicksort -
…The interesting thing here is that they turn out to be slower than our approach using portable intrinsics (github.com/google/highway) :)
comment by janwas · 2022-06-04 · in Vectorized and performance-portable Quicksort -
…gives you wrapper functions over the platform's intrinsics, emulating missing functionality where required: github.com/google/highway. Disclosure: I am the main author.
comment by janwas · 2022-05-30 · in Why does this code execute more slowly after strength-reducing multiplications? -
…to program for since vector sizes keep getting bigger This can be fixed with an abstraction layer such as github.com/google/highway (disclosure: I am the main author). The programming model is variable-length vectors and we can map that…
comment by janwas · 2022-05-23 · in Faster CRC32 on the Apple M1 -
…per x86 vector instruction. it would be annoying to rewrite that per platform, but we didn't have to - github.com/google/highway (disclosure: I am the main author) provides portable intrinsics.
comment by janwas · 2022-04-28 · in Removing characters from strings faster with AVX-512 -
…with the x86 SIMD instructions Actually, when the code is expressed using "portable intrinsics" ( https://github.com/google/highway ), the source code looks the same but compiles to SSE4/AVX2/AVX-512 and NEON,SVE,SVE2 and RISC-V V…
comment by janwas · 2022-02-14 · in Prefix Sum with SIMD -
Yes, our github.com/google/highway does that for SSE4/AVX2/AVX-512. It targets at the level of instruction sets, though, not specific microarchitectures.
comment by janwas · 2022-02-04 · in Exploring SIMD performance improvements in WebAssembly (2021) -
…StoreInterleaved3 which is implemented similar to yours (more instructions but fewer constants): https://github.com/google/highway/blob/master/hwy/ops/x86_12... In my experience, integer mul are the hardest to bridge, but at least for dot…
comment by janwas · 2021-08-17 · in AVX512/VBMI2: A Programmer’s Perspective -
…benchmark does contain some boilerplate and extra code for measurements but a simple example is at https://github.com/google/highway/blob/master/hwy/examples/b... . Or how about https://github.com/google/highway/blob/master/hwy/examples/s..…
comment by janwas · 2021-08-16 · in Highway – Efficient and performance-portable SIMD -
…emulation is going to be way more expensive. Actually it uses exactly the same instruction :) https://github.com/google/highway/blob/master/hwy/ops/x86_25... Thanks for sharing the list! Out of curiosity, can you expand on what…
comment by janwas · 2021-08-15 · in AVX512/VBMI2: A Programmer’s Perspective