|
|
|
|
|
by grandempire
470 days ago
|
|
It’s a good example to illustrate how to get more simd from the compiler But the overly specific constraint means this is not a general count_if algorithm. For this to be useful I have to:
- know there are only 255 true values
- but have a large dataset so it’s worth optimizing
- not want to stop early when some threshold is met This is so specialized it’s not even worth having a generic predicate argument for. |
|
Many programming languages/frameworks expose this operation as `reduce()`.