The accepted answer is certainly not the fastest way to do this on R. This is significantly faster, I don't know if it is the fastest way:
M * outer(rep.int(1L, nrow(M)), v)
Note also a C/C++ based solution to this problem for both matrices and data frames is provided by collapse::TRA (which in addition supports grouped sweeping operations). Benckmark:
library(microbenchmark)
library(collapse)
all_obj_equal(t(t(M) * v), M * outer(rep.int(1L, nrow(M)), v), TRA(M, v, "*"))
[1] TRUE
microbenchmark(t(t(M) * v), M * outer(rep.int(1L, nrow(M)), v), TRA(M, v, "*"), times = 100, unit = "relative")
Unit: relative
expr min lq mean median uq max neval cld
t(t(M) * v) 16.256563 12.703469 10.771698 12.113859 10.148008 8.365288 100 c
M * outer(rep.int(1L, nrow(M)), v) 1.097177 1.449713 1.375522 1.426085 1.273911 1.785404 100 b
TRA(M, v, "*") 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 100 a
(Note: M here is the Eora 26 ICIO Matrix 2015 of Dimension 4915 x 4915, v is 1/output)