title: why is purrr::map2 so slow compared to base mapply?
body: <p>Consider this simple benchmark</p>
  
  <pre><code>list1 &lt;- as.list(rep(1, 50))
  list2 &lt;- as.list(rep(1, 50))
  
  microbenchmark::microbenchmark(
  +   map2(list1, list2, sum))
  Unit: microseconds
                      expr    min       lq     mean   median      uq     max neval
   map2(list1, list2, sum) 375.31 384.2045 481.8708 407.8115 420.641 7923.58   100
  
  microbenchmark::microbenchmark(
  +   mapply(sum, X=list1, Y=list2,  SIMPLIFY = FALSE))
  Unit: microseconds
                                                  expr    min     lq     mean  median      uq    max neval
   mapply(sum, X = list1, Y = list2, SIMPLIFY = FALSE) 46.187 50.634 57.45634 53.3715 59.8715 127.27   100
  </code></pre>
  
  <p>Why is <code>purrr:map2</code> almost <strong>8 times slower</strong> than <code>mapply</code> here? I mean, I am simply summing numbers side by side in the two lists. </p>
  
  <p>The problem is that I am using <code>map2</code> in my current code, so I would like to understand what is the overhead here (and how to possibly fix it)</p>
  
  <p>Thanks!</p>