On Sun, Mar 19, 2017 at 11:12 AM, Stefan Monnier wrote: > the other one is my locally built&hacked version with debugging > assertions and stuff. Is that the one that sets lexical-binding always? According to my measurements, the iterative case is slower on Emacs 25 when using dynamic binding. With lexical binding, the recursive case is always slower. (Note the measurements below are using unoptimized -O0 builds, with extra checking enabled) GNU Emacs 24.5.5 (x86_64-unknown-linux-gnu, X toolkit) of 2017-02-12 on zony | DYNAMIC | interpreted | compiled | |-----------+-------------+----------| | recursive | 7.64s | 5.61s | | iterative | 7.91s | 4.24s | | LEXICAL | interpreted | compiled | |-----------+----------------------------+------------------------| | recursive | 21.82s (12.20s in 470 GCs) | 4.73s (0.15s in 6 GCs) | | iterative | 8.87s (0.54s in 21 GCs) | 3.14s (0.15s in 6 GCs) | GNU Emacs 25.2.6 (x86_64-unknown-linux-gnu, X toolkit) of 2017-03-01 | DYNAMIC | interpreted | compiled | |-----------+-------------+----------| | recursive | 10.58s | 6.39s | | iterative | 14.05s | 6.72s | | LEXICAL | interpreted | compiled | |-----------+----------------------------+------------------------| | recursive | 35.44s (20.56s in 448 GCs) | 4.35s (0.28s in 6 GCs) | | iterative | 13.20s ( 0.92s in 20 GCs) | 2.96s (0.23s in 5 GCs) |