Tazinho / Advanced-R-Solutions

Set of solutions for the Advanced R programming book
https://advanced-r-solutions.rbind.io/
290 stars 118 forks source link

Exercise 19.3 Q2 Different Conclusion #290

Open nealxun opened 1 year ago

nealxun commented 1 year ago

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

Screenshot 2023-08-10 at 3 45 18 PM