% Vectorization without Condescension % Noam Ross % 14-04-07 09:09:18
Beginning R users are often told to "vectorize" their code. Here, I try to explain why vectorization can be advantageous in R by showing how R works under the hood.
Now, remember, premature optimization is the root of all evil (Knuth). Don't start re-writing your code unless the time saved is going to be worth the time invested. Other approaches, like finding a bigger machine or parallelization, could give you more bang for the buck in terms of programming time. But if you und