Created attachment 1601 [details]
Patch for na.rm performance in Summary group
There was a performance issue identified here:
Thanks to Martin Morgan, the bottleneck was identified to be duplication of the call in preparation for dispatch. The attached patch resolves the issue by avoiding duplication when not necessary. It also avoids adding the na.rm argument to the arguments, because it seems undesirable to pass the argument to a method when the user did not specify it; missing() returns a confusing result.
The patch is only lightly tested, but it does improve performance by orders of magnitude for small inputs.
Created attachment 1602 [details]
Simpler shallow duplication strategy
It is unclear what the intention here is: the two patches conflict.
The second has been applied in R-devel.
As the 2nd patch has been applied (16 months) ago, and there was no follow up,
this can be considered fixed.