-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ARROW-12533: [C++] Add random real distribution function #10283
Conversation
NOTE: Below benchmark results are the same, but the total run time differs much. The saved time is from test preparation (generating random bools by calling bernoulli_distribution), not the test itself. Test on Neoverse N1. Clang-10, libstdc++-9. Before: 59.9s total run time
After: 1.2s total run time
|
Tested on Xeon Gold 5218. Clang10, libstdc++-9. Before: 5.4s total run time
After: 1.2s total run time
|
2df3b65
to
3b055f7
Compare
Timed running all arrow-compute-*-benchmark tests on x86, clang. Total time drops from 26 to 18 min. |
Travis CI passed at https://travis-ci.org/github/cyb70289/arrow/builds/770391382 |
Clang with gnu libstdc++ produces code very slow in generating random real numbers on Arm64. This patch implements three random utilities based on clang libc++: - std::generate_canonical - std::random_real_distribution - std::bernoulli_distribution It brings ~100x speedup on Arm64 and ~8x on x86_64 in generating random reals when build arrow with clang + gnu libstdc++. No influence to gcc + libstdc++, or clang + libc++.
3b055f7
to
11abdc4
Compare
Thank you @cyb70289 ! |
Clang with gnu libstdc++ produces code very slow in generating random real numbers on Arm64. This patch implements three random utilities based on clang libc++: - std::generate_canonical - std::random_real_distribution - std::bernoulli_distribution It brings ~100x speedup on Arm64 and ~8x on x86_64 in generating random reals when build arrow with clang + gnu libstdc++. No influence to gcc + libstdc++, or clang + libc++. Closes apache#10283 from cyb70289/12533-random-real Authored-by: Yibo Cai <yibo.cai@arm.com> Signed-off-by: Antoine Pitrou <antoine@python.org>
Clang with gnu libstdc++ produces code very slow in generating random
real numbers on Arm64.
This patch implements three random utilities based on clang libc++:
It brings ~100x speedup on Arm64 and ~8x on x86_64 in generating
random reals when build arrow with clang + gnu libstdc++.
No influence to gcc + libstdc++, or clang + libc++.