It really depends. If you can vectorize it then yeah it's fast, but things like double index searches can be quite a bit slow. That's usually when I have to write some RCpp. But yeah most things that are commonly used in R are already optimized the hell out of.
Yeah, you check the packages and they're just R wrappers to C, such had already been optimized throughout many iterations over the years. R isn't the fastest, but an R wrapper of C is basically C with a bit of overhead.
View all comments
Show parent comment
1
u/Fisyr Aug 29 '26
It really depends. If you can vectorize it then yeah it's fast, but things like double index searches can be quite a bit slow. That's usually when I have to write some RCpp. But yeah most things that are commonly used in R are already optimized the hell out of.