From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Skarda Newsgroups: gmane.emacs.devel Subject: Re: Speed improvements to ido.el Date: Fri, 30 Nov 2012 14:42:22 +0100 Message-ID: References: <87fw438w46.fsf@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf30334b3fe7b06e04cfb69200 X-Trace: ger.gmane.org 1354282990 24420 80.91.229.3 (30 Nov 2012 13:43:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 30 Nov 2012 13:43:10 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 30 14:43:19 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TeQs8-00059G-IT for ged-emacs-devel@m.gmane.org; Fri, 30 Nov 2012 14:43:16 +0100 Original-Received: from localhost ([::1]:40551 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TeQrx-0005mT-9T for ged-emacs-devel@m.gmane.org; Fri, 30 Nov 2012 08:43:05 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:37051) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TeQrm-0005ku-S0 for emacs-devel@gnu.org; Fri, 30 Nov 2012 08:43:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TeQrb-00075H-F6 for emacs-devel@gnu.org; Fri, 30 Nov 2012 08:42:54 -0500 Original-Received: from mail-qa0-f41.google.com ([209.85.216.41]:50642) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TeQrb-00074U-7w for emacs-devel@gnu.org; Fri, 30 Nov 2012 08:42:43 -0500 Original-Received: by mail-qa0-f41.google.com with SMTP id o19so1575895qap.0 for ; Fri, 30 Nov 2012 05:42:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=mBIN9gfObGgMYLObY3to/zhdqh5GSfi6p5Hgkjd2OUI=; b=k7VJThzNDpg7b2MRVVxulSWFfRMQPFMvXEitpyohJkZZz8nSpapetMEuC1Sz7IthbY KZVfMNz5xjGFqciT/ateqEWJiL9/EcR90QVKUeOPxoImxWyuGiG4p5fhYO0mqNw8fb5i TrLMoeQ3fKeMZ/JWHEKILFKk93LftZFjMUoWeEto3aQ9+r4lpN3S9GXgu0p7zkTHzEXt wGsreMBqMmnRQzJ9LxG/r18Ef5Tkv9dEqvyXu67Ehsbk+FkuG2F/uGnq/NtyeFx+HTvS EuEexxgtZCVVOOh95XNF+ybwsvokFPCqKz/meQQbPJ9o/1FZE7wMhqgRK3jm3c7OOf1+ g6Tg== Original-Received: by 10.224.179.208 with SMTP id br16mr3034795qab.25.1354282962497; Fri, 30 Nov 2012 05:42:42 -0800 (PST) Original-Received: by 10.49.119.232 with HTTP; Fri, 30 Nov 2012 05:42:22 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.216.41 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:155144 Archived-At: --20cf30334b3fe7b06e04cfb69200 Content-Type: text/plain; charset=KOI8-R Hi, I prepared detailed benchmark. Results: - standard Emacs 24.3 indeed provides significant speed improvement over 23.3 in ido flexible matching - original ido-better-flex performance is terrible - speed-hack introduces two improvements: ido-mode patches and (shared) bitmaps - ido-mode patches improve ido E24 performance - bitmap optimization provides significant improvement for better-flex but slows down E24 a little bit - shared bitmaps significantly improve performance of all methods My setup: - debian x64 testing on Lenovo R400 (Intel Core2 Duo) - debian testnig emacs 23.3 & emacs-snapshot 20121115 from http://emacs.naquadah.org/ - to avoid cpu frequency scaling, I call cpufreq-set -r -g userspace -d 800MHz -u 800MHz - I use benchmark-run to meassure time and garbage collection Tests I simulate interactive ido mode by calls to ido-set-matches. I emulate typing by setting ido-text. I start with one character and append one character for each iteration (eg. 'a', 'ab', 'abc' etc...) I use 4 different tests: - "abcdefghijklmnopqrstuvwxyz" - this test favours my patches, because they reuse results from last matching. - "-etaimn" - most common characters in English (and Emacs commands). The number of completions will not be reduced too much in this test. - "bcfile" - "real-world" example. Shortcut for byte-compile-file - "fndgd" - second "real-world" example. Shortcut for find-grep-dired Ido uses obarray to complete all 4 examples. To have same conditions, I saved the completion list to file (39580 symbols). All tests start with fresh Emacs and with the same list to complete. Variants I tested following variants: - ido-mode - ido mode file version - cmn - ido-set-common-completion is part of the test - flx - ido-enable-flex-matching on and off - cas - ido-case-fold on and off - rgx - ido-enable-regexp on and off - better - ido-better-flex off, original and patched version - cache - use of bimaps cache (only for ido-speed-hack) ido-mode variants: - 23.3 - file from 23.3 distribution - 24.3 - file from debian emacs-snapshot package (as of 20121122) - patched - 24.3 + patches (function inlining and avoid gc) - bitmaps - using ido-speed-hack bitmaps and result caching - shared - bitmaps are cached between executions. Results - Emacs 23.3 | ido-mode | cmn | flx | cas | rgx | better | "a..z" | #GC | GC | -etaimn | #GC | GC | bcfile | #GC | GC | fndgd | #GC | GC | |----------+-----+-----+-----+-----+--------+---------+------+---------+---------+------+--------+---------+-----+--------+---------+-----+--------| | 23.3 | - | - | - | - | - | 25.373 | 87 | 7.715 | 7.98 | 26 | 2.32 | 5.582 | 20 | 1.766 | 5.728 | 20 | 1.794 | | 23.3 | t | - | - | - | - | 27.980 | 106 | 9.466 | 11.526 | 50 | 4.649 | 6.727 | 29 | 2.559 | 7.089 | 30 | 2.659 | | 23.3 | - | t | - | - | - | 371.272 | 87 | 7.703 | 112.883 | 26 | 2.333 | 38.856 | 20 | 1.787 | 41.674 | 20 | 1.792 | | 23.3 | - | t | t | - | - | 592.653 | 87 | 7.714 | 181.204 | 26 | 2.343 | 60.389 | 20 | 1.793 | 64.969 | 20 | 1.799 | | 23.3 | - | - | - | t | - | 24.662 | 87 | 7.708 | 7.480 | 26 | 2.330 | 5.371 | 20 | 1.768 | 5.450 | 20 | 1.770 | | 23.3 | - | - | - | - | orig | 463.980 | 1289 | 117.554 | 204.444 | 615 | 58.911 | 129.562 | 340 | 30.715 | 137.558 | 370 | 33.878 | | 23.3 | - | - | t | - | orig | 885.647 | 2440 | 222.092 | 342.790 | 1035 | 98.879 | 239.584 | 629 | 57.987 | 256.425 | 695 | 64.553 | |----------+-----+-----+-----+-----+--------+---------+------+---------+---------+------+--------+---------+-----+--------+---------+-----+--------| | 24.3 | - | - | - | - | - | 25.465 | 87 | 7.700 | 8.019 | 26 | 2.343 | 5.613 | 20 | 1.767 | 5.707 | 20 | 1.775 | | 24.3 | t | - | - | - | - | 28.182 | 106 | 9.493 | 11.572 | 50 | 4.664 | 6.777 | 29 | 2.561 | 7.127 | 30 | 2.660 | | 24.3 | - | t | - | - | - | 47.964 | 87 | 7.725 | 13.261 | 26 | 2.329 | 7.575 | 20 | 1.768 | 7.804 | 20 | 1.773 | | 24.3 | - | t | t | - | - | 67.351 | 87 | 7.738 | 18.109 | 26 | 2.335 | 10.264 | 20 | 1.787 | 10.592 | 20 | 1.775 | | 24.3 | - | - | - | t | - | 24.791 | 87 | 7.714 | 7.513 | 26 | 2.318 | 5.382 | 20 | 1.771 | 5.487 | 20 | 1.771 | | 24.3 | - | - | - | - | orig | 459.364 | 1299 | 116.504 | 203.055 | 620 | 58.518 | 129.042 | 344 | 31.143 | 136.720 | 373 | 34.116 | | 24.3 | - | - | t | - | orig | 875.099 | 2440 | 219.660 | 338.753 | 1040 | 97.563 | 236.528 | 639 | 57.794 | 252.875 | 699 | 63.647 | |----------+-----+-----+-----+-----+--------+---------+------+---------+---------+------+--------+---------+-----+--------+---------+-----+--------| | patched | - | - | - | - | - | 13.209 | 2 | 0.184 | 4.697 | 3 | 0.277 | 2.838 | 1 | 0.090 | 2.950 | 1 | 0.087 | | patched | t | - | - | - | - | 14.984 | 15 | 1.401 | 7.057 | 20 | 1.912 | 3.518 | 6 | 0.551 | 3.895 | 8 | 0.731 | | patched | - | t | - | - | - | 32.246 | 3 | 0.267 | 9.443 | 4 | 0.365 | 4.335 | 1 | 0.088 | 4.578 | 1 | 0.089 | | patched | - | t | t | - | - | 51.477 | 3 | 0.265 | 14.232 | 4 | 0.363 | 7.024 | 1 | 0.088 | 7.385 | 1 | 0.090 | | patched | - | - | - | t | - | 12.853 | 2 | 0.177 | 4.267 | 3 | 0.271 | 2.676 | 1 | 0.088 | 2.774 | 1 | 0.089 | | patched | - | - | - | - | patch | 430.462 | 1176 | 107.325 | 185.306 | 554 | 53.674 | 107.259 | 278 | 24.945 | 115.460 | 310 | 27.954 | | patched | - | - | t | - | patch | 835.141 | 2295 | 205.013 | 319.621 | 967 | 92.213 | 201.717 | 538 | 48.043 | 218.950 | 599 | 53.997 | |----------+-----+-----+-----+-----+--------+---------+------+---------+---------+------+--------+---------+-----+--------+---------+-----+--------| | bitmaps | - | - | - | - | - | 12.109 | 10 | 1.067 | 15.753 | 20 | 2.197 | 11.172 | 10 | 1.061 | 11.633 | 10 | 1.066 | | bitmaps | t | - | - | - | - | 13.824 | 20 | 2.233 | 17.727 | 30 | 3.426 | 11.432 | 10 | 1.075 | 12.087 | 11 | 1.193 | | bitmaps | - | t | - | - | - | 12.379 | 10 | 1.066 | 17.347 | 20 | 2.204 | 11.273 | 10 | 1.068 | 11.760 | 10 | 1.076 | | bitmaps | - | t | t | - | - | 12.849 | 10 | 1.068 | 19.326 | 20 | 2.190 | 11.507 | 10 | 1.061 | 12.160 | 10 | 1.069 | | bitmaps | - | - | - | t | - | 13.561 | 10 | 1.157 | 5.120 | 10 | 1.157 | 3.610 | 10 | 1.051 | 3.803 | 10 | 1.151 | | bitmaps | - | - | - | - | patch | 25.564 | 40 | 4.500 | 87.040 | 180 | 21.534 | 19.759 | 30 | 3.351 | 26.850 | 41 | 4.705 | | bitmaps | - | - | t | - | patch | 39.640 | 70 | 7.918 | 139.870 | 290 | 35.046 | 27.684 | 41 | 4.575 | 42.250 | 71 | 8.024 | |----------+-----+-----+-----+-----+--------+---------+------+---------+---------+------+--------+---------+-----+--------+---------+-----+--------| | shared | - | - | - | - | - | 3.617 | 4 | 0.452 | 6.836 | 10 | 1.167 | 2.470 | 2 | 0.215 | 3.044 | 3 | 0.329 | | shared | t | - | - | - | - | 5.338 | 14 | 1.609 | 9.127 | 23 | 2.674 | 3.162 | 6 | 0.678 | 3.916 | 8 | 0.897 | | shared | - | t | - | - | - | 3.986 | 5 | 0.548 | 8.549 | 11 | 1.247 | 2.545 | 2 | 0.218 | 3.173 | 3 | 0.331 | | shared | - | t | t | - | - | 4.482 | 5 | 0.549 | 10.544 | 11 | 1.247 | 2.805 | 2 | 0.222 | 3.590 | 3 | 0.326 | | shared | - | - | - | t | - | 12.662 | 2 | 0.219 | 4.134 | 2 | 0.214 | 2.645 | 1 | 0.107 | 2.732 | 1 | 0.108 | | shared | - | - | - | - | patch | 17.136 | 34 | 3.869 | 78.877 | 172 | 20.579 | 11.027 | 21 | 2.377 | 18.757 | 38 | 4.313 | | shared | - | - | t | - | patch | 30.922 | 61 | 6.953 | 131.599 | 282 | 33.907 | 19.531 | 37 | 4.165 | 34.522 | 70 | 7.966 | |----------+-----+-----+-----+-----+--------+---------+------+---------+---------+------+--------+---------+-----+--------+---------+-----+--------| Results - Emacs 24.3.50 | ido-mode | cmn | flx | cas | rgx | better | "a..z" | #GC | GC | -etaimn | #GC | GC | bcfile | #GC | GC | fndgd | #GC | GC | |----------+-----+-----+-----+-----+--------+---------+------+---------+---------+-----+--------+---------+-----+--------+---------+-----+--------| | 23.3 | - | - | - | - | - | 23.422 | 86 | 7.802 | 7.265 | 25 | 2.281 | 5.170 | 20 | 1.808 | 5.265 | 20 | 1.812 | | 23.3 | t | - | - | - | - | 26.067 | 106 | 9.670 | 10.791 | 50 | 4.728 | 6.035 | 26 | 2.360 | 6.609 | 30 | 2.718 | | 23.3 | - | t | - | - | - | 370.813 | 86 | 7.795 | 112.986 | 25 | 2.288 | 38.377 | 20 | 1.807 | 41.195 | 20 | 1.790 | | 23.3 | - | t | t | - | - | 595.396 | 86 | 7.771 | 182.541 | 25 | 2.296 | 60.243 | 20 | 1.814 | 64.945 | 20 | 1.787 | | 23.3 | - | - | - | t | - | 23.010 | 86 | 7.704 | 6.915 | 25 | 2.254 | 5.025 | 20 | 1.792 | 5.101 | 20 | 1.792 | | 23.3 | - | - | - | - | orig | 354.581 | 1224 | 113.705 | 164.447 | 570 | 59.209 | 98.402 | 320 | 30.417 | 105.588 | 350 | 33.808 | | 23.3 | - | - | t | - | orig | 642.533 | 2310 | 213.541 | 261.947 | 969 | 98.604 | 174.093 | 600 | 57.592 | 186.379 | 659 | 62.799 | |----------+-----+-----+-----+-----+--------+---------+------+---------+---------+-----+--------+---------+-----+--------+---------+-----+--------| | 24.3 | - | - | - | - | - | 22.806 | 86 | 7.797 | 7.128 | 25 | 2.298 | 5.010 | 20 | 1.798 | 5.112 | 20 | 1.799 | | 24.3 | t | - | - | - | - | 25.488 | 106 | 9.651 | 10.632 | 50 | 4.708 | 5.899 | 26 | 2.366 | 6.471 | 30 | 2.712 | | 24.3 | - | t | - | - | - | 43.514 | 86 | 7.729 | 12.157 | 25 | 2.323 | 6.780 | 20 | 1.796 | 6.987 | 20 | 1.798 | | 24.3 | - | t | t | - | - | 62.310 | 86 | 7.761 | 16.737 | 25 | 2.322 | 9.357 | 20 | 1.797 | 9.681 | 20 | 1.804 | | 24.3 | - | - | - | t | - | 22.500 | 86 | 7.737 | 6.772 | 25 | 2.259 | 4.892 | 20 | 1.796 | 4.962 | 20 | 1.793 | | 24.3 | - | - | - | - | orig | 356.023 | 1227 | 115.312 | 162.438 | 571 | 57.330 | 97.526 | 320 | 29.748 | 104.051 | 350 | 32.425 | | 24.3 | - | - | t | - | orig | 642.029 | 2320 | 213.897 | 257.828 | 969 | 95.111 | 172.289 | 600 | 56.291 | 183.545 | 659 | 60.493 | |----------+-----+-----+-----+-----+--------+---------+------+---------+---------+-----+--------+---------+-----+--------+---------+-----+--------| | patched | - | - | - | - | - | 11.587 | 2 | 0.185 | 4.167 | 3 | 0.280 | 2.520 | 1 | 0.093 | 2.585 | 1 | 0.093 | | patched | t | - | - | - | - | 13.263 | 14 | 1.327 | 6.388 | 19 | 1.813 | 3.143 | 6 | 0.544 | 3.503 | 8 | 0.738 | | patched | - | t | - | - | - | 29.458 | 3 | 0.277 | 8.620 | 3 | 0.279 | 3.868 | 1 | 0.090 | 4.075 | 1 | 0.093 | | patched | - | t | t | - | - | 48.135 | 3 | 0.275 | 13.259 | 3 | 0.279 | 6.437 | 1 | 0.090 | 6.769 | 1 | 0.092 | | patched | - | - | - | t | - | 11.307 | 2 | 0.185 | 3.847 | 3 | 0.277 | 2.362 | 1 | 0.091 | 2.427 | 1 | 0.090 | | patched | - | - | - | - | patch | 326.320 | 1095 | 102.650 | 147.375 | 515 | 53.024 | 80.696 | 263 | 24.657 | 87.440 | 292 | 27.547 | | patched | - | - | t | - | patch | 607.426 | 2136 | 196.133 | 243.672 | 898 | 90.915 | 145.362 | 507 | 46.650 | 159.114 | 564 | 52.703 | |----------+-----+-----+-----+-----+--------+---------+------+---------+---------+-----+--------+---------+-----+--------+---------+-----+--------| | bitmaps | - | - | - | - | - | 9.825 | 10 | 1.061 | 13.090 | 20 | 2.180 | 9.068 | 10 | 1.052 | 9.442 | 10 | 1.054 | | bitmaps | t | - | - | - | - | 11.604 | 20 | 2.320 | 14.934 | 30 | 3.381 | 9.270 | 10 | 1.055 | 9.839 | 11 | 1.174 | | bitmaps | - | t | - | - | - | 10.084 | 10 | 1.052 | 14.586 | 20 | 2.160 | 9.149 | 10 | 1.062 | 9.569 | 10 | 1.061 | | bitmaps | - | t | t | - | - | 10.562 | 10 | 1.054 | 16.538 | 20 | 2.167 | 9.391 | 10 | 1.073 | 9.961 | 10 | 1.068 | | bitmaps | - | - | - | t | - | 12.150 | 10 | 1.043 | 4.632 | 10 | 1.043 | 3.324 | 10 | 1.037 | 3.407 | 10 | 1.0378 | | bitmaps | - | - | - | - | patch | 20.721 | 40 | 4.482 | 69.525 | 170 | 20.207 | 16.163 | 30 | 3.407 | 21.572 | 40 | 4.514 | | bitmaps | - | - | t | - | patch | 29.711 | 61 | 6.860 | 106.825 | 280 | 33.311 | 21.392 | 40 | 4.450 | 32.450 | 70 | 7.902 | |----------+-----+-----+-----+-----+--------+---------+------+---------+---------+-----+--------+---------+-----+--------+---------+-----+--------| | shared | - | - | - | - | - | 3.012 | 4 | 0.452 | 5.836 | 10 | 1.154 | 2.029 | 2 | 0.219 | 2.531 | 3 | 0.332 | | shared | t | - | - | - | - | 4.589 | 13 | 1.511 | 7.910 | 22 | 2.546 | 2.693 | 6 | 0.671 | 3.380 | 8 | 0.901 | | shared | - | t | - | - | - | 3.407 | 5 | 0.565 | 7.387 | 10 | 1.159 | 2.115 | 2 | 0.219 | 2.655 | 3 | 0.332 | | shared | - | t | t | - | - | 3.873 | 5 | 0.564 | 9.322 | 10 | 1.161 | 2.339 | 2 | 0.218 | 3.032 | 3 | 0.329 | | shared | - | - | - | t | - | 11.290 | 2 | 0.220 | 3.759 | 2 | 0.222 | 2.259 | 0 | 0.000 | 2.448 | 1 | 0.105 | | shared | - | - | - | - | patch | 13.653 | 33 | 3.784 | 62.698 | 163 | 19.750 | 8.690 | 20 | 2.262 | 14.945 | 37 | 4.231 | | shared | - | - | t | - | patch | 23.090 | 58 | 6.624 | 99.838 | 268 | 32.725 | 14.645 | 36 | 4.064 | 25.692 | 66 | 7.531 | |----------+-----+-----+-----+-----+--------+---------+------+---------+---------+-----+--------+---------+-----+--------+---------+-----+--------| On Thu, Nov 22, 2012 at 10:36 AM, Daniel Skarda wrote: > > Hi Dmitry, > > thanks for the suggestions. I will prepare some benchmarks using new Emacs and send the results. > I already did some statistics with elp during development, but I suspect that the numbers are not precise. > > I am curious which improvements will be the fastest :) > > Regards, > Dan > > > On Wed, Nov 21, 2012 at 4:37 AM, Dmitry Gutov wrote: >> >> Daniel Skarda writes: >> >> Hey Daniel, >> >> Like Leo said, please provide some numbers. >> >> A comparison to the current trunk would be best, since it contains an >> additional optimization compared to the emacs-24 branch. >> >> Here my test setup from the relevant discussion: >> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12796#47 >> >> --Dmitry >> >> > I like to use ido mode for everything, including very large lists (like M-x or >> > info). Unfortunately ido is not suitable for such lists. On my old notebook, >> > performance is not amazing, so I took the challenge and spend some time with >> > profiler. >> > >> > I improved the performance in several steps: >> > >> > - inlined several functions >> > - disabled ido-case-fold for some completions (eg commands) >> > - prunning collections based on character bitmaps >> > - caching character bitmaps during completion or for same completions >> > - caching intermediate completion lists when adding new characters >> > >> > You can view my changes on github: >> > >> > - https://github.com/orfelyus/ido-speed-hack >> > - https://github.com/orfelyus/ido-mode-el >> > >> > - (and optionally) https://github.com/orfelyus/ido-better-flex >> > >> > ido-speed-hack includes large changes (bitmaps) while ido-mode-el includes minor >> > changes to ido.el >> > >> > The changes made huge speed improvements on my notebook and ido does not feel >> > sluggish even with very large lists. >> > >> > Could you please test my improvements? I would appreciate any feedback. >> > Dan >> > >> > ps: I am not subscribed to the mailing list, please keep me in Cc > > --20cf30334b3fe7b06e04cfb69200 Content-Type: text/html; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Hi,
I prepared detailed benchmark. Results:

- standard Emacs 24.3= indeed provides significant speed improvement over 23.3 in ido flexible ma= tching
- original ido-better-flex performance is terrible
- speed-ha= ck introduces two improvements: ido-mode patches and (shared) bitmaps

- ido-mode patches improve ido E24 performance
- bitmap optimization= provides significant improvement for better-flex but slows down E24 a litt= le bit
- shared bitmaps significantly improve performance of all method= s

My setup:

- debian x64 testing on Lenovo R400 (Intel Core2 Duo)=
- debian testnig emacs 23.3 & emacs-snapshot 20121115 from http://emacs.naquadah.org/
- to avoi= d cpu frequency scaling, I call
=9A cpufreq-set -r -g userspace -d 800MHz -u 800MHz
- I use benchmark-ru= n to meassure time and garbage collection

Tests

I simulate in= teractive ido mode by calls to ido-set-matches. I emulate typing by
setting ido-text. I start with one character and append one character for e= ach
iteration (eg. 'a', 'ab', 'abc' etc...)

I us= e 4 different tests:

- "abcdefghijklmnopqrstuvwxyz" - this= test favours my patches, because they reuse
=9A results from last match= ing.
=9A
- "-etaimn" - most common characters in English (and Emac= s commands). The number
=9A of completions will not be reduced too much= in this test.
=9A
- "bcfile" - "real-world" e= xample. Shortcut for byte-compile-file

- "fndgd" - second "real-world" example. Shortcut f= or find-grep-dired

Ido uses obarray to complete all 4 examples. To h= ave same conditions,
I saved the completion list to file (39580 symbols)= . All tests
start with fresh Emacs and with the same list to complete.

Variants<= br>
I tested following variants:

- ido-mode - ido mode file vers= ion
- cmn - ido-set-common-completion is part of the test
- flx = - ido-enable-flex-matching on and off
- cas - ido-case-fold on and off
- rgx - ido-enable-regexp on and of= f

- better - ido-better-flex off, original and patched version
-= cache - use of bimaps cache (only for ido-speed-hack)

ido-mode va= riants:

- 23.3 =9A - file from 23.3 distribution
- 24.3 =9A - file from de= bian emacs-snapshot package (as of 20121122)
- patched =9A- 24.3 + patch= es (function inlining and avoid gc)
- bitmaps =9A- using ido-speed-hack = bitmaps and result caching
- shared =9A - bitmaps are cached between executions.


Results - = =9AEmacs 23.3


|= ido-mode | cmn | flx | cas | rgx | better | =9A"a..z" | =9A#GC |= =9A =9A =9AGC | -etaimn | =9A#GC | =9A =9A GC | =9Abcfile | #GC | =9A =9A = GC | =9A fndgd | #GC | =9A =9A GC |
|----------+-----+-----+-----+-----+--------+---------+------+---------+---= ------+------+--------+---------+-----+--------+---------+-----+--------|| 23.3 =9A =9A | - =9A | - =9A | - =9A | - =9A | - =9A =9A =9A| =9A25.373= | =9A 87 | =9A 7.715 | =9A =9A7.98 | =9A 26 | =9A 2.32 | =9A 5.582 | =9A20= | =9A1.766 | =9A 5.728 | =9A20 | =9A1.794 |
| 23.3 =9A =9A | t =9A | - =9A | - =9A | - =9A | - =9A =9A =9A| =9A27.980 |= =9A106 | =9A 9.466 | =9A11.526 | =9A 50 | =9A4.649 | =9A 6.727 | =9A29 | = =9A2.559 | =9A 7.089 | =9A30 | =9A2.659 |
| 23.3 =9A =9A | - =9A | t =9A= | - =9A | - =9A | - =9A =9A =9A| 371.272 | =9A 87 | =9A 7.703 | 112.883 | = =9A 26 | =9A2.333 | =9A38.856 | =9A20 | =9A1.787 | =9A41.674 | =9A20 | =9A1= .792 |
| 23.3 =9A =9A | - =9A | t =9A | t =9A | - =9A | - =9A =9A =9A| 592.653 | = =9A 87 | =9A 7.714 | 181.204 | =9A 26 | =9A2.343 | =9A60.389 | =9A20 | =9A1= .793 | =9A64.969 | =9A20 | =9A1.799 |
| 23.3 =9A =9A | - =9A | - =9A | -= =9A | t =9A | - =9A =9A =9A| =9A24.662 | =9A 87 | =9A 7.708 | =9A 7.480 | = =9A 26 | =9A2.330 | =9A 5.371 | =9A20 | =9A1.768 | =9A 5.450 | =9A20 | =9A1= .770 |
| 23.3 =9A =9A | - =9A | - =9A | - =9A | - =9A | orig =9A | 463.980 | 1289 = | 117.554 | 204.444 | =9A615 | 58.911 | 129.562 | 340 | 30.715 | 137.558 | = 370 | 33.878 |
| 23.3 =9A =9A | - =9A | - =9A | t =9A | - =9A | orig =9A= | 885.647 | 2440 | 222.092 | 342.790 | 1035 | 98.879 | 239.584 | 629 | 57.= 987 | 256.425 | 695 | 64.553 |
|----------+-----+-----+-----+-----+--------+---------+------+---------+---= ------+------+--------+---------+-----+--------+---------+-----+--------|| 24.3 =9A =9A | - =9A | - =9A | - =9A | - =9A | - =9A =9A =9A| =9A25.465= | =9A 87 | =9A 7.700 | =9A 8.019 | =9A 26 | =9A2.343 | =9A 5.613 | =9A20 |= =9A1.767 | =9A 5.707 | =9A20 | =9A1.775 |
| 24.3 =9A =9A | t =9A | - =9A | - =9A | - =9A | - =9A =9A =9A| =9A28.182 |= =9A106 | =9A 9.493 | =9A11.572 | =9A 50 | =9A4.664 | =9A 6.777 | =9A29 | = =9A2.561 | =9A 7.127 | =9A30 | =9A2.660 |
| 24.3 =9A =9A | - =9A | t =9A= | - =9A | - =9A | - =9A =9A =9A| =9A47.964 | =9A 87 | =9A 7.725 | =9A13.26= 1 | =9A 26 | =9A2.329 | =9A 7.575 | =9A20 | =9A1.768 | =9A 7.804 | =9A20 | = =9A1.773 |
| 24.3 =9A =9A | - =9A | t =9A | t =9A | - =9A | - =9A =9A =9A| =9A67.351 |= =9A 87 | =9A 7.738 | =9A18.109 | =9A 26 | =9A2.335 | =9A10.264 | =9A20 | = =9A1.787 | =9A10.592 | =9A20 | =9A1.775 |
| 24.3 =9A =9A | - =9A | - =9A= | - =9A | t =9A | - =9A =9A =9A| =9A24.791 | =9A 87 | =9A 7.714 | =9A 7.51= 3 | =9A 26 | =9A2.318 | =9A 5.382 | =9A20 | =9A1.771 | =9A 5.487 | =9A20 | = =9A1.771 |
| 24.3 =9A =9A | - =9A | - =9A | - =9A | - =9A | orig =9A | 459.364 | 1299 = | 116.504 | 203.055 | =9A620 | 58.518 | 129.042 | 344 | 31.143 | 136.720 | = 373 | 34.116 |
| 24.3 =9A =9A | - =9A | - =9A | t =9A | - =9A | orig =9A= | 875.099 | 2440 | 219.660 | 338.753 | 1040 | 97.563 | 236.528 | 639 | 57.= 794 | 252.875 | 699 | 63.647 |
|----------+-----+-----+-----+-----+--------+---------+------+---------+---= ------+------+--------+---------+-----+--------+---------+-----+--------|| patched =9A| - =9A | - =9A | - =9A | - =9A | - =9A =9A =9A| =9A13.209 |= =9A =9A2 | =9A 0.184 | =9A 4.697 | =9A =9A3 | =9A0.277 | =9A 2.838 | =9A 1= | =9A0.090 | =9A 2.950 | =9A 1 | =9A0.087 |
| patched =9A| t =9A | - =9A | - =9A | - =9A | - =9A =9A =9A| =9A14.984 | = =9A 15 | =9A 1.401 | =9A 7.057 | =9A 20 | =9A1.912 | =9A 3.518 | =9A 6 | = =9A0.551 | =9A 3.895 | =9A 8 | =9A0.731 |
| patched =9A| - =9A | t =9A |= - =9A | - =9A | - =9A =9A =9A| =9A32.246 | =9A =9A3 | =9A 0.267 | =9A 9.44= 3 | =9A =9A4 | =9A0.365 | =9A 4.335 | =9A 1 | =9A0.088 | =9A 4.578 | =9A 1 = | =9A0.089 |
| patched =9A| - =9A | t =9A | t =9A | - =9A | - =9A =9A =9A| =9A51.477 | = =9A =9A3 | =9A 0.265 | =9A14.232 | =9A =9A4 | =9A0.363 | =9A 7.024 | =9A 1 = | =9A0.088 | =9A 7.385 | =9A 1 | =9A0.090 |
| patched =9A| - =9A | - =9A= | - =9A | t =9A | - =9A =9A =9A| =9A12.853 | =9A =9A2 | =9A 0.177 | =9A 4.= 267 | =9A =9A3 | =9A0.271 | =9A 2.676 | =9A 1 | =9A0.088 | =9A 2.774 | =9A = 1 | =9A0.089 |
| patched =9A| - =9A | - =9A | - =9A | - =9A | patch =9A| 430.462 | 1176 | = 107.325 | 185.306 | =9A554 | 53.674 | 107.259 | 278 | 24.945 | 115.460 | 31= 0 | 27.954 |
| patched =9A| - =9A | - =9A | t =9A | - =9A | patch =9A| 8= 35.141 | 2295 | 205.013 | 319.621 | =9A967 | 92.213 | 201.717 | 538 | 48.04= 3 | 218.950 | 599 | 53.997 |
|----------+-----+-----+-----+-----+--------+---------+------+---------+---= ------+------+--------+---------+-----+--------+---------+-----+--------|| bitmaps =9A| - =9A | - =9A | - =9A | - =9A | - =9A =9A =9A| =9A12.109 |= =9A 10 | =9A 1.067 | =9A15.753 | =9A 20 | =9A2.197 | =9A11.172 | =9A10 | = =9A1.061 | =9A11.633 | =9A10 | =9A1.066 |
| bitmaps =9A| t =9A | - =9A | - =9A | - =9A | - =9A =9A =9A| =9A13.824 | = =9A 20 | =9A 2.233 | =9A17.727 | =9A 30 | =9A3.426 | =9A11.432 | =9A10 | = =9A1.075 | =9A12.087 | =9A11 | =9A1.193 |
| bitmaps =9A| - =9A | t =9A |= - =9A | - =9A | - =9A =9A =9A| =9A12.379 | =9A 10 | =9A 1.066 | =9A17.347 = | =9A 20 | =9A2.204 | =9A11.273 | =9A10 | =9A1.068 | =9A11.760 | =9A10 | = =9A1.076 |
| bitmaps =9A| - =9A | t =9A | t =9A | - =9A | - =9A =9A =9A| =9A12.849 | = =9A 10 | =9A 1.068 | =9A19.326 | =9A 20 | =9A2.190 | =9A11.507 | =9A10 | = =9A1.061 | =9A12.160 | =9A10 | =9A1.069 |
| bitmaps =9A| - =9A | - =9A |= - =9A | t =9A | - =9A =9A =9A| =9A13.561 | =9A 10 | =9A 1.157 | =9A 5.120 = | =9A 10 | =9A1.157 | =9A 3.610 | =9A10 | =9A1.051 | =9A 3.803 | =9A10 | = =9A1.151 |
| bitmaps =9A| - =9A | - =9A | - =9A | - =9A | patch =9A| =9A25.564 | =9A 4= 0 | =9A 4.500 | =9A87.040 | =9A180 | 21.534 | =9A19.759 | =9A30 | =9A3.351 = | =9A26.850 | =9A41 | =9A4.705 |
| bitmaps =9A| - =9A | - =9A | t =9A | = - =9A | patch =9A| =9A39.640 | =9A 70 | =9A 7.918 | 139.870 | =9A290 | 35.0= 46 | =9A27.684 | =9A41 | =9A4.575 | =9A42.250 | =9A71 | =9A8.024 |
|----------+-----+-----+-----+-----+--------+---------+------+---------+---= ------+------+--------+---------+-----+--------+---------+-----+--------|| shared =9A | - =9A | - =9A | - =9A | - =9A | - =9A =9A =9A| =9A 3.617 |= =9A =9A4 | =9A 0.452 | =9A 6.836 | =9A 10 | =9A1.167 | =9A 2.470 | =9A 2 |= =9A0.215 | =9A 3.044 | =9A 3 | =9A0.329 |
| shared =9A | t =9A | - =9A | - =9A | - =9A | - =9A =9A =9A| =9A 5.338 | = =9A 14 | =9A 1.609 | =9A 9.127 | =9A 23 | =9A2.674 | =9A 3.162 | =9A 6 | = =9A0.678 | =9A 3.916 | =9A 8 | =9A0.897 |
| shared =9A | - =9A | t =9A |= - =9A | - =9A | - =9A =9A =9A| =9A 3.986 | =9A =9A5 | =9A 0.548 | =9A 8.54= 9 | =9A 11 | =9A1.247 | =9A 2.545 | =9A 2 | =9A0.218 | =9A 3.173 | =9A 3 | = =9A0.331 |
| shared =9A | - =9A | t =9A | t =9A | - =9A | - =9A =9A =9A| =9A 4.482 | = =9A =9A5 | =9A 0.549 | =9A10.544 | =9A 11 | =9A1.247 | =9A 2.805 | =9A 2 | = =9A0.222 | =9A 3.590 | =9A 3 | =9A0.326 |
| shared =9A | - =9A | - =9A |= - =9A | t =9A | - =9A =9A =9A| =9A12.662 | =9A =9A2 | =9A 0.219 | =9A 4.13= 4 | =9A =9A2 | =9A0.214 | =9A 2.645 | =9A 1 | =9A0.107 | =9A 2.732 | =9A 1 = | =9A0.108 |
| shared =9A | - =9A | - =9A | - =9A | - =9A | patch =9A| =9A17.136 | =9A 3= 4 | =9A 3.869 | =9A78.877 | =9A172 | 20.579 | =9A11.027 | =9A21 | =9A2.377 = | =9A18.757 | =9A38 | =9A4.313 |
| shared =9A | - =9A | - =9A | t =9A | = - =9A | patch =9A| =9A30.922 | =9A 61 | =9A 6.953 | 131.599 | =9A282 | 33.9= 07 | =9A19.531 | =9A37 | =9A4.165 | =9A34.522 | =9A70 | =9A7.966 |
|----------+-----+-----+-----+-----+--------+---------+------+---------+---= ------+------+--------+---------+-----+--------+---------+-----+--------|

Results - Emacs 24.3.50

| ido-mode | cmn | flx | cas | rgx | better | =9A"a.= .z" | =9A#GC | =9A =9A =9AGC | -etaimn | #GC | =9A =9A GC | =9Abcfile = | #GC | =9A =9A GC | =9A fndgd | #GC | =9A =9A GC |
|----------+-----+-----+-----+-----+--------+---------+------+---------+---= ------+-----+--------+---------+-----+--------+---------+-----+--------|| 23.3 =9A =9A | - =9A | - =9A | - =9A | - =9A | - =9A =9A =9A| =9A23.422 = | =9A 86 | =9A 7.802 | =9A 7.265 | =9A25 | =9A2.281 | =9A 5.170 | =9A20 | = =9A1.808 | =9A 5.265 | =9A20 | =9A1.812 |
| 23.3 =9A =9A | t =9A | - =9A | - =9A | - =9A | - =9A =9A =9A| =9A26.067 |= =9A106 | =9A 9.670 | =9A10.791 | =9A50 | =9A4.728 | =9A 6.035 | =9A26 | = =9A2.360 | =9A 6.609 | =9A30 | =9A2.718 |
| 23.3 =9A =9A | - =9A | t =9A= | - =9A | - =9A | - =9A =9A =9A| 370.813 | =9A 86 | =9A 7.795 | 112.986 | = =9A25 | =9A2.288 | =9A38.377 | =9A20 | =9A1.807 | =9A41.195 | =9A20 | =9A1.= 790 |
| 23.3 =9A =9A | - =9A | t =9A | t =9A | - =9A | - =9A =9A =9A| 595.396 | = =9A 86 | =9A 7.771 | 182.541 | =9A25 | =9A2.296 | =9A60.243 | =9A20 | =9A1.= 814 | =9A64.945 | =9A20 | =9A1.787 |
| 23.3 =9A =9A | - =9A | - =9A | - = =9A | t =9A | - =9A =9A =9A| =9A23.010 | =9A 86 | =9A 7.704 | =9A 6.915 | = =9A25 | =9A2.254 | =9A 5.025 | =9A20 | =9A1.792 | =9A 5.101 | =9A20 | =9A1.= 792 |
| 23.3 =9A =9A | - =9A | - =9A | - =9A | - =9A | orig =9A | 354.581 | 1224 = | 113.705 | 164.447 | 570 | 59.209 | =9A98.402 | 320 | 30.417 | 105.588 | 3= 50 | 33.808 |
| 23.3 =9A =9A | - =9A | - =9A | t =9A | - =9A | orig =9A = | 642.533 | 2310 | 213.541 | 261.947 | 969 | 98.604 | 174.093 | 600 | 57.59= 2 | 186.379 | 659 | 62.799 |
|----------+-----+-----+-----+-----+--------+---------+------+---------+---= ------+-----+--------+---------+-----+--------+---------+-----+--------|| 24.3 =9A =9A | - =9A | - =9A | - =9A | - =9A | - =9A =9A =9A| =9A22.806 = | =9A 86 | =9A 7.797 | =9A 7.128 | =9A25 | =9A2.298 | =9A 5.010 | =9A20 | = =9A1.798 | =9A 5.112 | =9A20 | =9A1.799 |
| 24.3 =9A =9A | t =9A | - =9A | - =9A | - =9A | - =9A =9A =9A| =9A25.488 |= =9A106 | =9A 9.651 | =9A10.632 | =9A50 | =9A4.708 | =9A 5.899 | =9A26 | = =9A2.366 | =9A 6.471 | =9A30 | =9A2.712 |
| 24.3 =9A =9A | - =9A | t =9A= | - =9A | - =9A | - =9A =9A =9A| =9A43.514 | =9A 86 | =9A 7.729 | =9A12.15= 7 | =9A25 | =9A2.323 | =9A 6.780 | =9A20 | =9A1.796 | =9A 6.987 | =9A20 | = =9A1.798 |
| 24.3 =9A =9A | - =9A | t =9A | t =9A | - =9A | - =9A =9A =9A| =9A62.310 |= =9A 86 | =9A 7.761 | =9A16.737 | =9A25 | =9A2.322 | =9A 9.357 | =9A20 | = =9A1.797 | =9A 9.681 | =9A20 | =9A1.804 |
| 24.3 =9A =9A | - =9A | - =9A= | - =9A | t =9A | - =9A =9A =9A| =9A22.500 | =9A 86 | =9A 7.737 | =9A 6.77= 2 | =9A25 | =9A2.259 | =9A 4.892 | =9A20 | =9A1.796 | =9A 4.962 | =9A20 | = =9A1.793 |
| 24.3 =9A =9A | - =9A | - =9A | - =9A | - =9A | orig =9A | 356.023 | 1227 = | 115.312 | 162.438 | 571 | 57.330 | =9A97.526 | 320 | 29.748 | 104.051 | 3= 50 | 32.425 |
| 24.3 =9A =9A | - =9A | - =9A | t =9A | - =9A | orig =9A = | 642.029 | 2320 | 213.897 | 257.828 | 969 | 95.111 | 172.289 | 600 | 56.29= 1 | 183.545 | 659 | 60.493 |
|----------+-----+-----+-----+-----+--------+---------+------+---------+---= ------+-----+--------+---------+-----+--------+---------+-----+--------|| patched =9A| - =9A | - =9A | - =9A | - =9A | - =9A =9A =9A| =9A11.587 | = =9A =9A2 | =9A 0.185 | =9A 4.167 | =9A 3 | =9A0.280 | =9A 2.520 | =9A 1 | = =9A0.093 | =9A 2.585 | =9A 1 | =9A0.093 |
| patched =9A| t =9A | - =9A | - =9A | - =9A | - =9A =9A =9A| =9A13.263 | = =9A 14 | =9A 1.327 | =9A 6.388 | =9A19 | =9A1.813 | =9A 3.143 | =9A 6 | =9A= 0.544 | =9A 3.503 | =9A 8 | =9A0.738 |
| patched =9A| - =9A | t =9A | - = =9A | - =9A | - =9A =9A =9A| =9A29.458 | =9A =9A3 | =9A 0.277 | =9A 8.620 |= =9A 3 | =9A0.279 | =9A 3.868 | =9A 1 | =9A0.090 | =9A 4.075 | =9A 1 | =9A0= .093 |
| patched =9A| - =9A | t =9A | t =9A | - =9A | - =9A =9A =9A| =9A48.135 | = =9A =9A3 | =9A 0.275 | =9A13.259 | =9A 3 | =9A0.279 | =9A 6.437 | =9A 1 | = =9A0.090 | =9A 6.769 | =9A 1 | =9A0.092 |
| patched =9A| - =9A | - =9A |= - =9A | t =9A | - =9A =9A =9A| =9A11.307 | =9A =9A2 | =9A 0.185 | =9A 3.84= 7 | =9A 3 | =9A0.277 | =9A 2.362 | =9A 1 | =9A0.091 | =9A 2.427 | =9A 1 | = =9A0.090 |
| patched =9A| - =9A | - =9A | - =9A | - =9A | patch =9A| 326.320 | 1095 | = 102.650 | 147.375 | 515 | 53.024 | =9A80.696 | 263 | 24.657 | =9A87.440 | 2= 92 | 27.547 |
| patched =9A| - =9A | - =9A | t =9A | - =9A | patch =9A| = 607.426 | 2136 | 196.133 | 243.672 | 898 | 90.915 | 145.362 | 507 | 46.650 = | 159.114 | 564 | 52.703 |
|----------+-----+-----+-----+-----+--------+---------+------+---------+---= ------+-----+--------+---------+-----+--------+---------+-----+--------|| bitmaps =9A| - =9A | - =9A | - =9A | - =9A | - =9A =9A =9A| =9A 9.825 | = =9A 10 | =9A 1.061 | =9A13.090 | =9A20 | =9A2.180 | =9A 9.068 | =9A10 | =9A= 1.052 | =9A 9.442 | =9A10 | =9A1.054 |
| bitmaps =9A| t =9A | - =9A | - =9A | - =9A | - =9A =9A =9A| =9A11.604 | = =9A 20 | =9A 2.320 | =9A14.934 | =9A30 | =9A3.381 | =9A 9.270 | =9A10 | =9A= 1.055 | =9A 9.839 | =9A11 | =9A1.174 |
| bitmaps =9A| - =9A | t =9A | - = =9A | - =9A | - =9A =9A =9A| =9A10.084 | =9A 10 | =9A 1.052 | =9A14.586 | = =9A20 | =9A2.160 | =9A 9.149 | =9A10 | =9A1.062 | =9A 9.569 | =9A10 | =9A1.= 061 |
| bitmaps =9A| - =9A | t =9A | t =9A | - =9A | - =9A =9A =9A| =9A10.562 | = =9A 10 | =9A 1.054 | =9A16.538 | =9A20 | =9A2.167 | =9A 9.391 | =9A10 | =9A= 1.073 | =9A 9.961 | =9A10 | =9A1.068 |
| bitmaps =9A| - =9A | - =9A | - = =9A | t =9A | - =9A =9A =9A| =9A12.150 | =9A 10 | =9A 1.043 | =9A 4.632 | = =9A10 | =9A1.043 | =9A 3.324 | =9A10 | =9A1.037 | =9A 3.407 | =9A10 | 1.037= 8 |
| bitmaps =9A| - =9A | - =9A | - =9A | - =9A | patch =9A| =9A20.721 | =9A 4= 0 | =9A 4.482 | =9A69.525 | 170 | 20.207 | =9A16.163 | =9A30 | =9A3.407 | = =9A21.572 | =9A40 | =9A4.514 |
| bitmaps =9A| - =9A | - =9A | t =9A | - = =9A | patch =9A| =9A29.711 | =9A 61 | =9A 6.860 | 106.825 | 280 | 33.311 | = =9A21.392 | =9A40 | =9A4.450 | =9A32.450 | =9A70 | =9A7.902 |
|----------+-----+-----+-----+-----+--------+---------+------+---------+---= ------+-----+--------+---------+-----+--------+---------+-----+--------|| shared =9A | - =9A | - =9A | - =9A | - =9A | - =9A =9A =9A| =9A 3.012 | = =9A =9A4 | =9A 0.452 | =9A 5.836 | =9A10 | =9A1.154 | =9A 2.029 | =9A 2 | = =9A0.219 | =9A 2.531 | =9A 3 | =9A0.332 |
| shared =9A | t =9A | - =9A | - =9A | - =9A | - =9A =9A =9A| =9A 4.589 | = =9A 13 | =9A 1.511 | =9A 7.910 | =9A22 | =9A2.546 | =9A 2.693 | =9A 6 | =9A= 0.671 | =9A 3.380 | =9A 8 | =9A0.901 |
| shared =9A | - =9A | t =9A | - = =9A | - =9A | - =9A =9A =9A| =9A 3.407 | =9A =9A5 | =9A 0.565 | =9A 7.387 |= =9A10 | =9A1.159 | =9A 2.115 | =9A 2 | =9A0.219 | =9A 2.655 | =9A 3 | =9A0= .332 |
| shared =9A | - =9A | t =9A | t =9A | - =9A | - =9A =9A =9A| =9A 3.873 | = =9A =9A5 | =9A 0.564 | =9A 9.322 | =9A10 | =9A1.161 | =9A 2.339 | =9A 2 | = =9A0.218 | =9A 3.032 | =9A 3 | =9A0.329 |
| shared =9A | - =9A | - =9A |= - =9A | t =9A | - =9A =9A =9A| =9A11.290 | =9A =9A2 | =9A 0.220 | =9A 3.75= 9 | =9A 2 | =9A0.222 | =9A 2.259 | =9A 0 | =9A0.000 | =9A 2.448 | =9A 1 | = =9A0.105 |
| shared =9A | - =9A | - =9A | - =9A | - =9A | patch =9A| =9A13.653 | =9A 3= 3 | =9A 3.784 | =9A62.698 | 163 | 19.750 | =9A 8.690 | =9A20 | =9A2.262 | = =9A14.945 | =9A37 | =9A4.231 |
| shared =9A | - =9A | - =9A | t =9A | - = =9A | patch =9A| =9A23.090 | =9A 58 | =9A 6.624 | =9A99.838 | 268 | 32.725 = | =9A14.645 | =9A36 | =9A4.064 | =9A25.692 | =9A66 | =9A7.531 |
|----------+-----+-----+-----+-----+--------+---------+------+---------+---= ------+-----+--------+---------+-----+--------+---------+-----+--------|

On Thu, Nov 22, 2012 at 10:36 AM, Daniel Skarda <dan.skarda@gmail.com> wrote:
>
> Hi Dmitry,
>
> thanks for the suggestions. I will = prepare some benchmarks using new Emacs and send the results.
> I alr= eady did some statistics with elp during development, but I suspect that th= e numbers are not precise.
>
> I am curious which improvements will be the fastest :)
>=
> Regards,
> Dan
>
>
> On Wed, Nov 21, 2012 = at 4:37 AM, Dmitry Gutov <dgutov@yan= dex.ru> wrote:
>>
>> Daniel Skarda <dan.skarda@gmail.com> writes:
>>
>> Hey Daniel= ,
>>
>> Like Leo said, please provide some numbers.
>>
>> A comparison to the current trunk would be best, since= it contains an
>> additional optimization compared to the emacs-2= 4 branch.
>>
>> Here my test setup from the relevant disc= ussion:
>> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D12796#47
>>>> --Dmitry
>>
>> > I like to use ido mode for= everything, including very large lists (like M-x or
>> > info). Unfortunately ido is not suitable for such lists. On m= y old notebook,
>> > performance is not amazing, so I took the = challenge and spend some time with
>> > profiler.
>> &= gt;
>> > I improved the performance in several steps:
>> >=
>> > - inlined several functions
>> > - disabled i= do-case-fold for some completions (eg commands)
>> > - prunning= collections based on character bitmaps
>> > - caching character bitmaps during completion or for same com= pletions
>> > - caching intermediate completion lists when addi= ng new characters
>> >
>> > You can view my changes= on github:
>> >
>> > - https://github.com/orfelyus/ido-speed-hack
>> >= ; - https://github.com/= orfelyus/ido-mode-el
>> >
>> > - (and optionally) https://github.com/orfelyus/ido-better-flex<= /a>
>> >
>> > ido-speed-hack includes large changes= (bitmaps) while ido-mode-el includes minor
>> > changes to ido.el
>> >
>> > The chang= es made huge speed improvements on my notebook and ido does not feel
>= ;> > sluggish even with very large lists.
>> >
>>= ; > Could you please test my improvements? I would appreciate any feedba= ck.
>> > Dan
>> >
>> > ps: I am not subscribed= to the mailing list, please keep me in Cc
>
>
--20cf30334b3fe7b06e04cfb69200--