From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: cc-mode fontification feels random Date: Fri, 11 Jun 2021 15:57:10 -0400 Message-ID: References: <62e438b5-d27f-1d3c-69c6-11fe29a76d74@dancol.org> <83fsxsdxhu.fsf@gnu.org> <83pmwudgw3.fsf@gnu.org> <83k0n2cjg5.fsf@gnu.org> <83im2lbqmv.fsf@gnu.org> <179f6e4fa40.2816.cc5b3318d7e9908e2c46732289705cb0@dancol.org> <83fsxpbpn9.fsf@gnu.org> <83k0n09tkp.fsf@gnu.org> <837dj09p0e.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33497"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: dancol@dancol.org, acm@muc.de, rudalics@gmx.at, rms@gnu.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 11 21:58:05 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lrnI4-0008VR-Q4 for ged-emacs-devel@m.gmane-mx.org; Fri, 11 Jun 2021 21:58:04 +0200 Original-Received: from localhost ([::1]:51388 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lrnI3-00041i-PV for ged-emacs-devel@m.gmane-mx.org; Fri, 11 Jun 2021 15:58:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33114) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrnHL-0003Lc-Qy for emacs-devel@gnu.org; Fri, 11 Jun 2021 15:57:19 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:64684) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrnHI-0002gt-Lc; Fri, 11 Jun 2021 15:57:18 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 64BAA10028B; Fri, 11 Jun 2021 15:57:13 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id CD88A10020E; Fri, 11 Jun 2021 15:57:11 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1623441431; bh=6Cq+rGRfswe0aD+Y0lwLNxlhCtqZz7+i50stWf+UI8Q=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=bkF8FrfD3iSaXCTFDe5Z7ZOoMEa4nxgBMjTuM8ZpLMWO1SFiSFcnZuXn01BmuZfT5 UT78lqX6ZexUi1mALR9BWocYm0FLh5EfGuBuXZ/e+QDQppHFW0ygOvxzsr70KcXwm7 1Ib469ITSueLbFZn3NI3TPJRbjiyoQoHJVYVzoo2nK/ws3Qa3+EZJzs0tU+UMDv7eE zjbheyh5KHuEAZrux7j6/hxS24c7up9/lnU9uID/Phs+rkWlsPIS4p/3E9Re81r0/1 FVReY7OxJb2aiHR/qtYJSyECDvZwXwjSnLI13Y+ZaSocTS+z8SkOaK9Tat36X+Q/o4 h7SVKTyDBRrog== Original-Received: from alfajor (69-196-163-239.dsl.teksavvy.com [69.196.163.239]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 7EA93120186; Fri, 11 Jun 2021 15:57:11 -0400 (EDT) In-Reply-To: <837dj09p0e.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 11 Jun 2021 22:31:45 +0300") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:270726 Archived-At: > Will Emacs 27.2 do? If you must see results from an optimized build > of Emacs 28, I'll have to build one first. As mentioned, mine was not an optimized build, on the contrary. >> FWIW, I ran this same test with `sm-c-mode` (which should handle `xdisp.c` >> about as well as CC-mode, but solves an easier problem since it doesn't >> try to handle as much of C as CC-mode does (e.g. no support for K&R, no >> highlighting of types), nor does it try to handle C++, Java, ...), and >> most of the times for it are between 0.02 and 0.04. > > That is much better, but still too slow, IMO. Think: it's the time > that it takes us to fontify a single windowful, only a couple of > dozens of lines. Why does it take so long? For comparison, here it is for lisp/subr.el: it seems actually slightly slower than what I for with xdisp.c when using sm-c-mode. Stefan 0.075539393 0.030856317 0.040824289 0.029961978 0.012222597 0.020277377 0.08354889 0.027791121 0.040834603 0.029304419 0.040401518 0.042230931 0.041249748 0.041759172 0.022928028 0.088205301 0.01791448 0.039915906 0.041701691 0.036885006 0.037948645 0.039082061 0.03723824 0.090796121 0.021685216 0.040341389 0.041098352 0.012256459 0.038770756 0.047087185 0.036423884 0.04461722 0.082821279 0.02936458 0.038498799 0.029450549 0.039748644 0.037981817 0.041704413 0.03614839 0.040829019 0.03792122 0.088297379 0.031529965 0.038930449 0.035313203 0.040872462 0.040254486 0.043807937 0.037344524 0.041937701 0.086986891 0.02128011 0.038679053 0.037372497 0.042372958 0.045191831 0.026552158 0.038718167 0.040198771 0.086453442 0.020748667 0.036524354 0.038769191 0.036234863 0.0399449 0.040732675 0.039041865 0.037608296 0.078606241 0.022010691 0.03774944 0.028604627 0.040171841 0.039866605 0.035715879 0.041613829 0.035701447 0.037601563 0.085249827 0.018101252 0.041692999 0.033016519 0.037679106 0.039894138 0.036513263 0.04271547 0.038203434 0.089595139 0.022256597 0.040981642 0.037780354 0.036986214 0.033088927 0.03626288 0.037085366 0.023201762 0.088236647 0.019961394 0.033811429 0.040647559 0.034390619 0.039764122 0.022225068 0.026550511 0.037590894 0.085617853 0.022528 0.040158828 0.039360065 0.015918947 let: End of buffer