These compilations are a work in progress and I will add to them, but here are some Glock 27 vs 23 results. The 40S&W loses very little from a 4":
Federal 180gr JHP -------------------- 913 vs 962
Rem 180gr Golden Saber --------------- 934 vs 961
Speer 180gr Lawman ------------------- 914 vs 967
Fed 155gr HydraShok ------------------ 1077 vs 1107
Speer 155gr GoldDot ------------------ 1148 vs 1210
Win 155gr SilverTip ------------------ 1082 vs 1131 (another sample only 1080)
CorBon 135gr ------------------------- 1210 vs 1258
Win 180gr SXT ------------------------ ???? vs 911
Rem 165gr Golden Saber --------------- ???? vs 1040
Here is a good resource for some Glock 23 results: http://stevespages.com/page8f40sw.html