This is a great example how you cannot figure it out after spending
two hours troubleshooting, but a few minutes after you post to
R-devel, it's just jumps to you (is there a word for this other than
impatient?);
Let me answer my own question. The discrepancy between my sum2() code
and the
I'm observing that base::sum(x, na.rm=FALSE) for typeof(x) == double
is much more time consuming when there are missing values versus when
there are not. I'm observing this on both Window and Linux, but it's
quite surprising to me. Currently, my main suspect is settings in on
how R was built.