neoremind commented on PR #16631: URL: https://github.com/apache/lucene/pull/16631#issuecomment-5580291747
Thanks @slow-J ! The e2e performance gain makes sense given Amdahl's law. I also ran the JMH on a c5.4xlarge with AVX-512, the same finding, bothPacked is slower, and the gap is even larger than m6g.16xlarge with Graviton. | dims | SinglePacked | BothPacked | Δ | |---:|---:|---:|---:| | 128 | 42.286 | 38.084 | −9.9% | | 1024 | 8.771 | 6.955 | −20.7% | | 4096 | 2.412 | 1.851 | −23.3% | Looking into the JMH microbenchmark and VectorUtil impl., I think there are more nibble-extraction ops on the packed query in bothPacked, whereas the query input is already one-value-per-byte living at hot L1 in singlePacked without extra extraction computations, even thought extra extraction computation is an instruction-level parallel work. Also, the saving on fewer load in bothPacked doesn't help since this is not a memory bound operation. singlePacked looks a better fit here. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
