3 ms·
Sorting is costly though! This summing problem is solved by xsum: https://gitlab.com/radfordneal/xsum https://gitlab.com/radfordneal/xsum There is room for mo
by kardos 2y ago
Sorting is costly though!
This summing problem is solved by xsum: https://gitlab.com/radfordneal/xsum https://gitlab.com/radfordneal/xsum
There is room for more work here to make it faster or use less memory though.
- 77pt77 2y agosorting is nlogn in general and faster for numerics. Plus after sorting you can use SIMD to sum everything much faster. But yes, xsum and the like are more accurate.