I think it would be helpful to run the profiler against your real data to get a better sense. This sample data is so small I feel like we are splitting hairs. If the data are large enough, converting to data.table will help in adjusted2 (or just plug in {dtplyr} per my previous post to you )