Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Improve the performance in cast kernel using AsPrimitive trait in generic dispatch #252

Closed
sundy-li opened this issue Aug 5, 2021 · 0 comments · Fixed by #254
Closed
Labels
enhancement An improvement to an existing feature

Comments

@sundy-li
Copy link
Collaborator

sundy-li commented Aug 5, 2021

Beat arrow2 cast performance less than 10 LOC, about 7 times faster in casting 2^20 size u32array to u64array.

Benchmark codes:

https://github.com/sundy-li/learn/blob/master/arrow-vs-arrow2/benches/cast_kernels.rs

Gnuplot not found, using plotters backend
cast u32 to u64 1048576 time:   [4.3537 ms 4.3615 ms 4.3702 ms]                                     
                        change: [-0.0612% +0.1772% +0.4521%] (p = 0.17 > 0.05)
                        No change in performance detected.


cast u32 to u64 v2 1048576                                                                            
                        time:   [630.99 us 645.11 us 664.46 us]
                        change: [-11.727% -4.8932% +1.8462%] (p = 0.20 > 0.05)
                        No change in performance detected.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement An improvement to an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants