Open camel-cdr opened 3 years ago
Interesting, thanks! I didn't know OpenMP had this particular feature. As you pointed out, this is still fairly new-ish, so I'm going to hold onto this update for now, but I'm glad to have it (and learned about it).
I simplified the
exact_bias32
implementation usingomp parallel for reduction
instead of doing the reduction manually.I haven't tested this extensively, but I did compare two complete
./prospector -e -E -4 -l tests/murmurhash3_finalizer32.so
runs and found thatomp parallel for reduction
was a bit faster (original:~3 ns / hash
vs new:~2.8 ns / hash
).Note that the array reduction feature was added in OpenMP 4.5, which was released in 2016, so it might be too new to warrant the change.