title: Improving performance of split() function in R?
body: <p>I have a data frame in a very simple form:</p>
  
  <pre><code>    X Y
      ---
      A 1
      A 2
      B 3
      C 1
      C 3
  </code></pre>
  
  <p>My end result should be a list like this:</p>
  
  <pre><code>$`A`
  [1] 1 2
  
  $`B`
  [1] 3
  
  $`C`
  [1] 1 3
  </code></pre>
  
  <p>For this operation I am using the split() function in R:</p>
  
  <pre><code>k &lt;- split(Y, X)
  </code></pre>
  
  <p>This is working just fine. However, if I want to apply this code on a data frame containing 22 million rows including 10 million groups for X and 387000 values for Y it becomes really time consuming.
  I tried using the RRO 8.0 open version for MKL support. However, still only one Kernel is used. The CPU has 64 GB of RAM so that shouldn't be an issue.</p>
  
  <p>Any ideas for a smarter way to compute this?</p>