I ran your testcase and on my VM I get numbers like 3593.801 mswithout patch and 3593.801 with the patch, average of 5 runs each.The runs were quite consistent.
pgsql-hackers by date:
Соглашаюсь с условиями обработки персональных данных