Surajsuthar commented on code in PR #12462:
URL: https://github.com/apache/arrow-rs/pull/12462#discussion_r4716286114
##########
arrow-cast/src/cast/mod.rs:
##########
@@ -144,17 +199,27 @@ where
F: Fn(D::Native) -> f64,
{
let array = array.as_primitive::<D>();
+
+ if scale == 0 {
Review Comment:
so reason i separate this path only for that if scale is 0 then
integer-to-float can directly converted without any additional work no div,
mul, power calculation, or per-value scale branch is needed, we could add on
slow path as well wont make much difference
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]