You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0da7340
Browse filesBrowse the repository at this point in the historyBrowse files
LLVM left some widening pairs scalar, such as `i64` to `i128`.
`widen_values` and `widened_buffer` widened each value with a checked
cast and an `expect`, and collected through `BufferMut::extend_iter`,
whose write loop has two exits.
Build the buffer with `from_trusted_len_iter`, like the Arrow exporter,
and fall back to zero instead of panicking. The fallback is dead when
the target is at least as wide as the source, so the loop has one exit
and no panic edge. `widened_buffer` now calls `widen_values`. A runtime
assert guards the widths and folds away. A `const` assert does not
compile, because the disabled `if const` branches of the callers still
name the narrower pairs.
On Apple M4, `i64` to `i128` is about 1.75x faster and `i32` to `i64`
is unchanged, but widening into `i256` is 1.24x to 1.7x slower, for a
reason we did not find. That widening only happens at precision 39 to
76, and once #10946 and #10905 land, most such columns decode to a
`Widen`, so one loop for every width is the simpler trade.
Signed-off-by: Connor Tsui <[email protected]>
0 commit comments