emacs-devel
[Top][All Lists]
Advanced

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

Re: CC Mode with font-lock-maximum-decoration 2


From: Gregory Heytings
Subject: Re: CC Mode with font-lock-maximum-decoration 2
Date: Tue, 09 Aug 2022 19:49:53 +0000


I think the bit you missed was:

I don't know what makes it [CC Mode with font-lock-maximum-decoration 2]

Try it again with that setting.

Indeed, that was it.


That being said, IMO that comparison is unfair, because Emacs Lisp has only two fontification levels, so font-lock-maximum-decoration t and 2 are the same (and likewise nil and 1 are the same). A fairer comparison would be to use one less than the maximum level in each case, that is, font-lock-maximum-decoration 2 for CC Mode and font-lock-maximum-decoration 1 for Emacs Lisp. In which case the numbers are much less favorable:

1. (benchmark-run 1 (time-scroll)) is 3.3 seconds for complex.el and 6.2 seconds for xdisp.c, two times slower;

2. (benchmark-run 1 (font-lock-fontify-region (point-min) (point-max))) is 0.25 seconds for complex.el and 1.75 seconds for xdisp.c, seven times slower.



reply via email to

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