William Balach, Kelly Bowman, and Lauri Mohler, all from Pennsylvania State University, studied the effects of music genre and tempo on memory retention. They had four groups learn vocabulary words using one of four instrumental pieces - slow classical, slow jazz, fast classical, and fast jazz. Each of the four groups was divided into smaller groups for the recall test. These sub groups used either the same (i.e. slow classical, slow classical) or different (i.e. slow jazz, fast classical) pieces when taking the recall test. The results did show a dependency on the music. Recall was better when the music was the same during learning and testing. These same researchers did another test which restricted the changes in the music to just tempo (i.e. slow to fast jazz) or just genre (i.e. slow jazz to slow classical). Surprisingly, the results showed that changing the genre had no effect on recall but changing the tempo decreased recall.
for more info, see http://www.cerebromente.org.br/n15/mente/musica.html