emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs rendering comparisson between emacs23 and emacs26.3


From: Eli Zaretskii
Subject: Re: emacs rendering comparisson between emacs23 and emacs26.3
Date: Sat, 28 Mar 2020 12:08:30 +0300

> Date: Sat, 28 Mar 2020 10:09:59 +0300
> From: Eli Zaretskii <address@hidden>
> Cc: address@hidden, address@hidden, address@hidden
> 
> > It would be interesting to compare 24 and 23, to see what slowdown
> > there is.
> 
> I expect an average twofold slowdown due to bidirectional support.

Actually, I take that back: in benchmarks such as scroll-up-benchmark,
and in a buffer with predominantly ASCII text, the effect of
bidirectional support should be very small, perhaps 10% or 20%.

So the issue of testing old v23.x CC Mode with newer versions of Emacs
becomes more important than I originally thought.  Just as a teaser,
here's the profile I obtained by scrolling in Emacs 26.3 through the
entire xdisp.c, it seems to point to c-find-decl-spots and its
immediate callers and subroutines as the hot spots:

- command-execute                                                1446 100%
 - call-interactively                                            1446 100%
  - funcall-interactively                                        1446 100%
   - execute-extended-command                                    1446 100%
    - command-execute                                            1446 100%
     - call-interactively                                        1446 100%
      - funcall-interactively                                    1446 100%
       - scroll-up-benchmark                                     1446 100%
        - let                                                    1446 100%
         - condition-case                                        1446 100%
          - while                                                1446 100%
           - redisplay                                           1351  93%
            - redisplay_internal (C function)                    1071  74%
             - jit-lock-function                                 1064  73%
              - jit-lock-fontify-now                             1063  73%
               - jit-lock--run-functions                         1063  73%
                - run-hook-wrapped                               1063  73%
                 - #<compiled 0x2000000008356520>                1063  73%
                  - font-lock-fontify-region                     1061  73%
                   - c-font-lock-fontify-region                  1061  73%
                    - font-lock-default-fontify-region            982  67%
                     - font-lock-fontify-keywords-region          969  67%
                      - c-font-lock-declarations                  686  47%
                       - c-find-decl-spots                        674  46%
                        - #<compiled 0x20000000077e07c0>          477  32%
                         - c-get-fontification-context            253  17%
                          - c-looking-at-or-maybe-in-bracelist    203  14%
                           - c-backward-token-2                   196  13%
                            - c-backward-sws                       35   2%
                             - c-beginning-of-macro                12   0%
                                back-to-indentation                 6   0%
                          - c-backward-token-2                     16   1%
                           - c-backward-sws                         7   0%
                              c-beginning-of-current-token          1   0%
                             c-beginning-of-current-token           1   0%
                          - c-back-over-compound-identifier        15   1%
                           - c-backward-sws                         6   0%
                            - c-beginning-of-macro                  3   0%
                               back-to-indentation                  3   0%
                             c-on-identifier                        5   0%
                             c-backward-token-2                     2   0%
                          - c-backward-sws                          6   0%
                             c-beginning-of-macro                   1   0%
                         - c-forward-decl-or-cast-1               125   8%
                          - c-forward-type                         65   4%
                           - c-forward-name                        18   1%
                              c-forward-sws                         4   0%
                           - c-syntactic-content                    4   0%
                              c-forward-sws                         1   0%
                              apply                                 1   0%
                             c-add-type                             3   0%
                           - c-forward-keyword-clause               2   0%
                              c-forward-sws                         1   0%
                          - c-backward-token-2                      9   0%
                             c-backward-sws                         3   0%
                             c-beginning-of-current-token           2   0%
                          - c-directly-in-class-called-p            3   0%
                           - c-looking-at-decl-block                2   0%
                            - c-syntactic-skip-backward             2   0%
                             - c-parse-state                        2   0%
                              - c-parse-state-1                     1   0%
                               - c-parse-state-get-strategy         1   0%
                                - c-beginning-of-macro              1   0%
                                   back-to-indentation              1   0%
                              - c-beginning-of-macro                1   0%
                                 back-to-indentation                1   0%
                           - c-parse-state                          1   0%
                              c-parse-state-1                       1   0%
                          - c-forward-name                          3   0%
                             c-forward-sws                          2   0%
                            c-forward-sws                           3   0%
                            c-forward-annotation                    1   0%
                         - c-forward-label                         33   2%
                          - c-after-conditional                     8   0%
                           - c-backward-token-2                     6   0%
                            - c-backward-sws                        5   0%
                             - c-beginning-of-macro                 1   0%
                                back-to-indentation                 1   0%
                               c-beginning-of-current-token         1   0%
                          - c-syntactic-re-search-forward           7   0%
                           - c-beginning-of-macro                   4   0%
                              back-to-indentation                   1   0%
                            c-forward-sws                           4   0%
                            c-beginning-of-current-token            1   0%
                         - c-backward-sws                          12   0%
                          - c-beginning-of-macro                    2   0%
                             back-to-indentation                    1   0%
                         - c-font-lock-single-decl                 10   0%
                          - c-font-lock-declarators                 9   0%
                           - c-forward-declarator                   8   0%
                            - c-backward-sws                        3   0%
                               c-beginning-of-current-token         2   0%
                            - c-forward-name                        2   0%
                               c-forward-sws                        1   0%
                              c-syntactic-re-search-forward         1   0%
                         - c-backward-token-2                      10   0%
                            c-backward-sws                          4   0%
                            c-beginning-of-current-token            3   0%
                        - c-bs-at-toplevel-p                      141   9%
                         - c-brace-stack-at                       135   9%
                          - c-update-brace-stack                  126   8%
                           - c-syntactic-re-search-forward         87   6%
                            - c-beginning-of-macro                 22   1%
                               back-to-indentation                 15   1%
                             c-beginning-of-current-token          17   1%
                             match-string-no-properties             1   0%
                        - c-beginning-of-macro                     13   0%
                           back-to-indentation                      9   0%
                          c-forward-sws                            11   0%
                          c-backward-sws                            1   0%
                      - c-font-lock-cut-off-declarators           116   8%
                       - c-back-over-member-initializers           35   2%
                        - c-parse-state                             8   0%
                         - c-parse-state-1                          8   0%
                          - c-remove-stale-state-cache              3   0%
                           - c-beginning-of-macro                   3   0%
                              back-to-indentation                   1   0%
                          - c-append-to-state-cache                 2   0%
                           - c-beginning-of-macro                   2   0%
                              back-to-indentation                   2   0%
                          - c-parse-state-get-strategy              1   0%
                             c-beginning-of-macro                   1   0%
                        - c-just-after-func-arglist-p               7   0%
                           c-beginning-of-statement-1               7   0%
                        - c-backward-sws                            5   0%
                         - c-beginning-of-macro                     2   0%
                            back-to-indentation                     2   0%
                        - c-back-over-compound-identifier           2   0%
                           c-on-identifier                          2   0%
                       - c-syntactic-skip-backward                 30   2%
                        - c-parse-state                            16   1%
                         - c-parse-state-1                         16   1%
                          - c-append-lower-brace-pair-to-state-cache   5   0%
                             c-beginning-of-macro                   1   0%
                            c-remove-stale-state-cache              2   0%
                            c-append-to-state-cache                 2   0%
                          - c-remove-stale-state-cache-backwards    2   0%
                             c-state-balance-parens-backwards       1   0%
                           - c-state-literal-at                     1   0%
                              c-state-pp-to-literal                 1   0%
                          - c-parse-state-get-strategy              1   0%
                           - c-beginning-of-macro                   1   0%
                              #<compiled 0x2000000001a3f060>        1   0%
                          c-beginning-of-macro                      1   0%
                       - c-determine-limit                         22   1%
                          c-state-semi-pp-to-literal                8   0%
                        - c-determine-limit                         3   0%
                           c-state-semi-pp-to-literal               2   0%
                       - c-parse-state                              6   0%
                        - c-parse-state-1                           6   0%
                           c-append-lower-brace-pair-to-state-cache 6   0%
                       - c-forward-decl-or-cast-1                   5   0%
                          c-forward-annotation                      1   0%
                        - c-forward-type                            1   0%
                           c-forward-name                           1   0%
                       - c-get-fontification-context                3   0%
                        - c-looking-at-or-maybe-in-bracelist        3   0%
                           c-backward-token-2                       3   0%
                       - c-at-toplevel-p                            3   0%
                        - c-search-uplist-for-classkey              3   0%
                         - c-looking-at-decl-block                  3   0%
                          - c-syntactic-skip-backward               3   0%
                           - c-parse-state                          2   0%
                            - c-parse-state-1                       1   0%
                               c-remove-stale-state-cache-backwards 1   0%
                              c-beginning-of-macro                  1   0%
                         c-forward-sws                              2   0%
                       - c-font-lock-single-decl                    1   0%
                          c-font-lock-declarators                   1   0%
                      - c-font-lock-enclosing-decls                54   3%
                       - c-determine-limit                         25   1%
                        - c-state-semi-pp-to-literal               12   0%
                           #<compiled 0x2000000001a640b8>           1   0%
                        - c-determine-limit                         4   0%
                           c-state-semi-pp-to-literal               3   0%
                       - c-syntactic-skip-backward                 16   1%
                        - c-parse-state                            10   0%
                         - c-parse-state-1                          9   0%
                          - c-parse-state-get-strategy              3   0%
                           - c-beginning-of-macro                   2   0%
                              back-to-indentation                   1   0%
                          - c-remove-stale-state-cache-backwards    3   0%
                             c-state-balance-parens-backwards       1   0%
                           - c-state-literal-at                     1   0%
                              c-state-pp-to-literal                 1   0%
                             c-beginning-of-macro                   1   0%
                          - c-append-to-state-cache                 1   0%
                             c-beginning-of-macro                   1   0%
                           c-beginning-of-macro                     1   0%
                        - c-backward-sws                            2   0%
                         - c-beginning-of-macro                     1   0%
                            back-to-indentation                     1   0%
                          copy-tree                                 1   0%
                          c-beginning-of-macro                      1   0%
                       - c-parse-state                              7   0%
                        - c-parse-state-1                           6   0%
                         - c-append-to-state-cache                  4   0%
                            c-beginning-of-macro                    1   0%
                           c-remove-stale-state-cache               1   0%
                        - c-beginning-of-macro                      1   0%
                           back-to-indentation                      1   0%
                         c-forward-sws                              1   0%
                      - c-font-lock-complex-decl-prepare           25   1%
                       - c-parse-state                             15   1%
                        - c-parse-state-1                          15   1%
                         - c-append-to-state-cache                  8   0%
                            c-append-lower-brace-pair-to-state-cache  1   0%
                         - c-parse-state-get-strategy               3   0%
                          - c-beginning-of-macro                    2   0%
                             back-to-indentation                    2   0%
                          - c-get-fallback-scan-pos                 1   0%
                           - beginning-of-defun                     1   0%
                              beginning-of-defun-raw                1   0%
                         - c-remove-stale-state-cache               2   0%
                          - c-beginning-of-macro                    2   0%
                             back-to-indentation                    1   0%
                       - c-backward-sws                             7   0%
                        - c-beginning-of-macro                      5   0%
                           back-to-indentation                      2   0%
                        #<compiled 0x20000000077e7950>             13   0%
                        #<compiled 0x20000000077e7538>             12   0%
                      - c-font-lock-enum-tail                      11   0%
                       - c-backward-over-enum-header                6   0%
                        - c-backward-token-2                        4   0%
                         - c-backward-sws                           4   0%
                            c-beginning-of-current-token            1   0%
                       - c-parse-state                              5   0%
                        - c-parse-state-1                           4   0%
                         - c-remove-stale-state-cache               2   0%
                            c-beginning-of-macro                    1   0%
                           c-append-to-state-cache                  1   0%
                          c-beginning-of-macro                      1   0%
                        #<compiled 0x20000000077e79d0>             11   0%
                        #<compiled 0x20000000077e7aa0>              7   0%
                      - c-font-lock-invalid-single-quotes           7   0%
                       - c-literal-limits                           3   0%
                          c-state-full-pp-to-literal                3   0%
                        #<compiled 0x20000000077e7678>              7   0%
                      - #<compiled 0x2000000007807748>              3   0%
                       - c-font-lock-doc-comments                   3   0%
                        - c-literal-start                           2   0%
                           c-state-semi-pp-to-literal               2   0%
                        #<compiled 0x20000000077e7808>              2   0%
                        c-font-lock-enum-body                       1   0%
                     - font-lock-fontify-syntactically-region       9   0%
                        syntax-ppss                                 7   0%
                    - c-before-context-fl-expand-region            77   5%
                     - mapc                                        77   5%
                      - #<compiled 0x20000000078876d8>             77   5%
                       - c-context-expand-fl-region                76   5%
                        - c-fl-decl-start                          62   4%
                         - c-syntactic-skip-backward               27   1%
                          - c-parse-state                          11   0%
                           - c-parse-state-1                       11   0%
                            - c-append-to-state-cache               5   0%
                             - c-beginning-of-macro                 1   0%
                                back-to-indentation                 1   0%
                               c-append-lower-brace-pair-to-state-cache   1   0%
                            - c-parse-state-get-strategy            1   0%
                             - c-beginning-of-macro                 1   0%
                                back-to-indentation                 1   0%
                              c-remove-stale-state-cache            1   0%
                          - c-beginning-of-macro                    1   0%
                             back-to-indentation                    1   0%
                         - c-determine-limit                       17   1%
                            c-state-semi-pp-to-literal              9   0%
                          - c-determine-limit                       2   0%
                           - c-determine-limit                      1   0%
                              c-state-semi-pp-to-literal            1   0%
                             c-state-semi-pp-to-literal             1   0%
                         - c-literal-start                          6   0%
                          - c-state-semi-pp-to-literal              6   0%
                             c-parse-ps-state-below                 2   0%
                         - c-looking-at-or-maybe-in-bracelist       5   0%
                            c-backward-token-2                      5   0%
                         - c-forward-type                           3   0%
                            c-forward-name                          2   0%
                           c-backward-sws                           1   0%
                        - c-fl-decl-end                            11   0%
                         - c-literal-start                          7   0%
                          - c-state-semi-pp-to-literal              6   0%
                             c-parse-ps-state-below                 1   0%
                           c-on-identifier                          1   0%
                           c-forward-declarator                     1   0%
                         - c-backward-sws                           1   0%
                            c-beginning-of-macro                    1   0%
                    bug-reference-fontify                           2   0%
               file-remote-p                                        3   0%
             - find-image                                           2   0%
                image-search-load-path                              2   0%
             - eval                                                 1   0%
                if                                                  1   0%
            - timer-event-handler                                   1   0%
             - apply                                                1   0%
                jit-lock-force-redisplay                            1   0%




reply via email to

[Prev in Thread] Current Thread [Next in Thread]