Commits

Wes McKinney authored 7038533abca
ARROW-9197: [C++] Overhaul integer/floating point casting: vectorize truncation checks, reduce binary size Bunch of stuff in this PR: * Speed up safe integer/floating<->integer/floating casts, especially when they are mostly not null * Compiled size of scalar_cast_numeric.cc.o is down to 736KB from 1210KB. There's about 70KB of new code in util/int_util.cc.o for some of the stuff below. Net reduction of 400KB in libarrow.so on Linux/clang-8 * Start overdue casting benchmark suite. There are benchmarks for some of the casts I worked on in this PR to help show the before/after performance * General purpose `CheckIntegersInRange` for fast range-checking of integer arrays * Augment scalar-cast-test to check casting `arrow::Scalar` values, too. I disabled these casts for the types where they aren't supported: decimal (see ARROW-9194), string (ARROW-9198), dictionary, lists (ARROW-9199), and temporal types (ARROW-9196). * I discovered by `nm` sleuthing that our code in `BoxScalar` in codegen_internal.h was generating a lot of binary for some reason, so this has been fixed. Closes #7506 from wesm/ARROW-9197 Authored-by: Wes McKinney <wesm@apache.org> Signed-off-by: Wes McKinney <wesm@apache.org>