From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: State of the overlay tree branch? Date: Mon, 19 Mar 2018 08:36:20 +0200 Message-ID: <83woy8o9ln.fsf@gnu.org> References: <834lldp18f.fsf@gnu.org> <9646341d-700b-4240-216b-8c0e753fa79f@arkona-technologies.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1521441263 14370 195.159.176.226 (19 Mar 2018 06:34:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 19 Mar 2018 06:34:23 +0000 (UTC) Cc: emacs-devel@gnu.org To: Sebastian Sturm Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 19 07:34:19 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1exoN8-0003du-6e for ged-emacs-devel@m.gmane.org; Mon, 19 Mar 2018 07:34:18 +0100 Original-Received: from localhost ([::1]:40474 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1exoPB-0002jB-0M for ged-emacs-devel@m.gmane.org; Mon, 19 Mar 2018 02:36:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54262) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1exoP3-0002j4-Vv for emacs-devel@gnu.org; Mon, 19 Mar 2018 02:36:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1exoOz-0007sW-0B for emacs-devel@gnu.org; Mon, 19 Mar 2018 02:36:18 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49732) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1exoOy-0007sK-Sa; Mon, 19 Mar 2018 02:36:12 -0400 Original-Received: from [176.228.60.248] (port=1935 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1exoOy-0001Dw-6e; Mon, 19 Mar 2018 02:36:12 -0400 In-reply-to: <9646341d-700b-4240-216b-8c0e753fa79f@arkona-technologies.de> (message from Sebastian Sturm on Mon, 19 Mar 2018 00:03:11 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:223804 Archived-At: > From: Sebastian Sturm > Date: Mon, 19 Mar 2018 00:03:11 +0100 > > Again, however, line-number-at-pos shows up as a large CPU time consumer > in the profiler report, and benchmark-run still reports several ms per > invocation (though this time it's usually around 2 to 4 ms instead of > the 20 to 25 I measured earlier), so I'd still be very much interested > in a faster line-number-at-pos implementation. 2 to 4 ms for 6 calls is as fast as you can get for a 70K file. But you should be able to issue just one call, and replace the other 5 with relative counting using count-lines or forward-line, which should then count only a small number of lines from the original location. Right?