From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Tobias C. Rittweiler" Newsgroups: gmane.emacs.devel Subject: byte-compiling a few font-lock related functions Date: Sat, 04 Jul 2009 11:05:45 +0200 Message-ID: <87skhcx1g6.fsf@freebits.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1246698383 3927 80.91.229.12 (4 Jul 2009 09:06:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 Jul 2009 09:06:23 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 04 11:06:16 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MN1CJ-0004TC-HI for ged-emacs-devel@m.gmane.org; Sat, 04 Jul 2009 11:06:15 +0200 Original-Received: from localhost ([127.0.0.1]:52139 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MN1CI-0001G7-Vx for ged-emacs-devel@m.gmane.org; Sat, 04 Jul 2009 05:06:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MN1CD-0001Ex-KT for emacs-devel@gnu.org; Sat, 04 Jul 2009 05:06:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MN1C8-0001C9-Ge for emacs-devel@gnu.org; Sat, 04 Jul 2009 05:06:08 -0400 Original-Received: from [199.232.76.173] (port=35525 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MN1C8-0001C6-8n for emacs-devel@gnu.org; Sat, 04 Jul 2009 05:06:04 -0400 Original-Received: from main.gmane.org ([80.91.229.2]:41894 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MN1C7-0000V4-PT for emacs-devel@gnu.org; Sat, 04 Jul 2009 05:06:04 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MN1C0-0000YM-0S for emacs-devel@gnu.org; Sat, 04 Jul 2009 09:05:56 +0000 Original-Received: from host145.natpool.mwn.de ([138.246.7.145]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 04 Jul 2009 09:05:55 +0000 Original-Received: from tcr by host145.natpool.mwn.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 04 Jul 2009 09:05:55 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 27 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: host145.natpool.mwn.de User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:gQD7/trrZSvWyKSM8tt+aChtFe0= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:112004 Archived-At: At the moment, ELP reports the following functions as the most expensive while scrolling through a large .lisp file (almost 10k lines): jit-lock-function 703 4.114131 0.0058522489 jit-lock-fontify-now 703 4.107315 0.0058425533 font-lock-fontify-region 705 4.0757660000 0.0057812283 font-lock-default-fontify-region 705 4.0608700000 0.0057600992 font-lock-fontify-keywords-region 705 1.8490479999 0.0026227631 Byte-compiling these files results in the following timings: jit-lock-function 703 3.4189879999 0.0048634253 jit-lock-fontify-now 703 3.4116139999 0.0048529359 font-lock-fontify-region 703 3.3229810000 0.0047268577 font-lock-default-fontify-region 703 3.3077700000 0.0047052204 font-lock-fontify-keywords-region 703 1.6209109999 0.0023057055 (CVS version from late April.) Difference is over half a second, so perhaps it'd make sense to ship these functions byte-compiled? -T. PS. This is the first scrolling through the file. Later scrolling is much snappier due to jit-lock.