-
Notifications
You must be signed in to change notification settings - Fork 21
sum() slower than custom summing function #120
Comments
Either this is pretty much fixed in the latest master and 0.6 or it's hardware specific. When I run your example, I get
However, it is still as you said if the array is mostly not missing values.
I also tried it where bob had no missing values, and then sum is much faster than the loop. It must be calling a specialized method. |
Looks like the timings improved in 0.6. I still see a relatively small difference on 0.5. As you not, the strategy used by |
Despite being specialized for
NullableArray
,sum
is slower than a loop written by hand, both on current master and on my branch improving operations onNullable
. This is most likely due to branching and to some unexpected allocations. We should check whether the compiler is able to generate optimal code when calling the operators naively, or whether specializingreduce
forNullableArray
can still be useful.On a recent Julia git master, with my operations branch:
The text was updated successfully, but these errors were encountered: