Using a bigger and faster machine

Instead of rewriting critical sections of your code, consider running the code on a machine with a faster processor, more cores, more RAM memory, faster bus speeds, and/or reduced disk latency. This suggestion may seem like a glib cop-out, but it's not. Sure, using a bigger machine for your analytics sometimes means extra money, but your time, dear reader, is money too. If, over the course of your work, it takes you many hours to optimize your code adequately, buying or renting a better machine may actually prove to be the more cost-effective solution.

Going down this road needn't require that you purchase a high-powered machine outrightly; there are now virtual servers that you can rent online for finite periods ...

Get R: Data Analysis and Visualization now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.