> Scrolling through emacs-25's xdisp.c, I get the following timings: > emacs-25 branch: 45.529s > master branch: 25.529s > > This is a speedup of around 78%. Thank you. Using the attached test2.el on frame.c, I get the following results for emacs -Q (‘foofoo’ scrolls up profiling ‘foo-1’, ‘foobar’ scrolls down profiling ‘bar-1’). emacs-25: Call Count Elapsed Time Average Time foo-1 169 109.15699999 0.6458994082 bar-1 169 113.032 0.6688284023 master: foo-1 169 45.28100000 0.2679349112 bar-1 169 53.406 0.3160118343 These look even better than yours (I have no idea which formula you used to derive a speedup of "78%" though). martin