There is a performance regression with 3.1.x related to MapReduce, may due to JS changes. More repro details in comments. This is storageEngine independent, both WT and MMAP show regression. The issue shows up in standalone as well as shard setup.
The latest master also show some regression vs. 3.1.8.