Lars Ingebrigtsen writes: > Hm... I'm not quite sure I understand these benchmarks. There are no > completion predicates for any eww-* symbols, I think? So there > shouldn't be any differences here at all, if I read the patch correctly. Oops, sorry, I conflated completion-predicate with command-modes. The eww completion is only one half of the benchmark; the rest operates over all commands in obarray (but less than 1% of those have a completion-predicate, hence the (failed) attempt to prefilter obarray). > What I was wondering was -- if (at some point in the future) we have, > say, 2K symbols with a completion predicate -- would putting that > condition-case inside the loop make things slower or not? My gut > feeling says that it's probably not an issue (so we should just go ahead > and do it), but it'd be nice to know... Here's the attached benchmark on 16K commands (warning: takes a while): == TAB RET == bench-vanilla-no-pred 3.533359 100 2.058253 bench-vanilla-no-pred 3.531937 100 2.054076 bench-vanilla-no-pred 3.529376 100 2.052615 bench-vanilla-with-pred 3.627937 105 2.127567 bench-vanilla-with-pred 3.616596 105 2.117001 bench-vanilla-with-pred 3.612720 105 2.114463 bench-vanilla-safe-pred 3.639222 105 2.132278 bench-vanilla-safe-pred 3.647615 105 2.134284 bench-vanilla-safe-pred 3.636989 105 2.127953 bench-safe-no-pred 3.573388 100 2.087055 bench-safe-no-pred 3.555347 100 2.069622 bench-safe-no-pred 3.545747 100 2.063041 bench-safe-with-pred 3.653066 105 2.145138 bench-safe-with-pred 3.643867 105 2.140400 bench-safe-with-pred 3.659689 105 2.150498 == b e n c h - TAB C-a C-k RET == bench-vanilla-no-pred 0.649064 0 0.000000 bench-vanilla-no-pred 0.652256 0 0.000000 bench-vanilla-no-pred 0.677194 0 0.000000 bench-vanilla-with-pred 1.652515 40 0.750009 bench-vanilla-with-pred 1.653861 40 0.753575 bench-vanilla-with-pred 1.672873 40 0.747151 bench-vanilla-safe-pred 1.669653 40 0.742116 bench-vanilla-safe-pred 1.673809 40 0.743255 bench-vanilla-safe-pred 1.672750 40 0.741095 bench-safe-no-pred 0.646114 0 0.000000 bench-safe-no-pred 0.644843 0 0.000000 bench-safe-no-pred 0.646764 0 0.000000 bench-safe-with-pred 1.672326 40 0.743054 bench-safe-with-pred 1.677331 40 0.742163 bench-safe-with-pred 1.711009 40 0.759025 So condition-case still looks negligible relative to the rest of the work, and my vote's for putting it around the call to read-extended-command-predicate. -- Basil