From 2dd3a0fdfa1e1fcb48aae29498512ee1f0eddd0e Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Mon, 7 Aug 2023 15:33:37 -0400 Subject: [PATCH] Boolean compress implementation comments --- src/builtins/slash.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/builtins/slash.c b/src/builtins/slash.c index be0aca20..ff8c78ea 100644 --- a/src/builtins/slash.c +++ b/src/builtins/slash.c @@ -2,8 +2,11 @@ // In the notes 𝕨 might indicate 𝕩 for Indices too // Boolean 𝕨 (Where/Compress) general case based on result type width -// Size 1: pext -// Emulate if unavailable +// Size 1: compress 64-bit units, possibly SIMD +// pext if BMI2 is present +// Pairwise combination, SIMD if AVX2 +// SIMD shift-by-offset if there's CLMUL but no AVX2 +// SHOULD use with polynomial multiply in NEON // COULD return boolean result from Where // Size 8, 16, 32, 64: mostly table-based // Where: direct table lookup, widening for 16 and 32 if available @@ -18,7 +21,7 @@ // None for 8-bit Where, too short // COULD try per-block adaptivity for 16-bit Compress // Sparse if +´𝕨 is small, branchless unless it's very small -// Chosen per-argument for 8, 16 and per-block for larger +// Chosen per-argument for 1, 8, 16 and per-block for larger // Careful when benchmarking, branch predictor has a long memory // Grouped if +Β΄Β»βŠΈβ‰ π•¨ is small, always branching // Chosen per-argument with a threshold that gives up early