emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] comment-cache 223d16f 2/3: Apply `comment-depth' text


From: Paul Eggert
Subject: Re: [Emacs-diffs] comment-cache 223d16f 2/3: Apply `comment-depth' text properties when calling `back_comment'.
Date: Sun, 13 Mar 2016 18:15:38 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

Eli Zaretskii wrote:
Here are my results, with today's emacs-25 and master:

             emacs-25     master    emacs-25.0.92    emacs-23.3
foo          33.375       33.89       2.859            1.375
bar         213.250      213.578     15.547            8.625

I get somewhat different results: when comparing Emacs 24.2 to Emacs master, 24.2 is 8% faster with -O2, 25% faster with -Og, and 3x faster with -O0. So, although there's a bit of slowdown otherwise (which should get looked at, at some point), the main culprit is -O0, and it probably is due to -O0's not inlining functions.

A quick build with --enable-profiling and CFLAGS=-O0 suggests that the primary bottlenecks with -O0 are CHAR_TABLE_REF_ASCII (18%), make_lisp_symbol (15%), builtin_lisp_symbol (11%), and PSEUDOVECTORP (6%). I suppose we could spend some time trying to make these go faster when compiling with -O0, but I think our time is better spent asking developers to use -Og, or to use -O0 more selectively.

I used master commit 181e92c4e060a7ce4740b561375f9ec9f473f144 src/xdisp.c, with Emacs built on Fedora 23 x86-64 (GCC 5.3.1):

              foo bar
  24.2   -O2  2.4  13
  24.2   -Og  3.0  17
  24.2   -O0  5.2  32
  master -O2  2.6  14
  master -Og  3.8  21
  master -O0 15    96

Fedora 23 can't build Emacs 23.3 due to some minor portability problems in 23.3, so I didn't benchmark that. I used the attached Lisp code to benchmark.


Attachment: bench-rudalics.el
Description: Text Data


reply via email to

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