Try to replicate the performance comparison between apply(x, 1, sum) and rowSums(x). It seems that the result I got indicates the running time gain is independent of the size of x. Is it due to apply function has a new version or is it related to the specific computer system I'm using.
Below is my system info and attached is the result comparison graph.
R version 4.2.3 (2023-03-15)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Ventura 13.3.1
Try to replicate the performance comparison between
apply(x, 1, sum)
androwSums(x)
. It seems that the result I got indicates the running time gain is independent of the size of x. Is it due toapply
function has a new version or is it related to the specific computer system I'm using.Below is my system info and attached is the result comparison graph. R version 4.2.3 (2023-03-15) Platform: aarch64-apple-darwin20 (64-bit) Running under: macOS Ventura 13.3.1