From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Pixel-based display functions Date: Mon, 09 Feb 2015 18:36:50 +0200 Message-ID: <838ug79h3x.fsf@gnu.org> References: <54CE2187.9070003@gmx.at> <83lhkhiq8t.fsf@gnu.org> <54CE54A3.1020707@gmx.at> <838ughilmo.fsf@gnu.org> <54CE6BD2.8000402@gmx.at> <8361bliin0.fsf@gnu.org> <83386piiby.fsf@gnu.org> <87oap9yoti.fsf@building.gnus.org> <874mqzvnwo.fsf@building.gnus.org> <83h9uzeb4a.fsf@gnu.org> <87bnl7jrr7.fsf@building.gnus.org> <831tm3dt8u.fsf@gnu.org> <87k2zvgj4d.fsf@building.gnus.org> <83siejcahb.fsf@gnu.org> <83sieiar6i.fsf@gnu.org> <83oap5c480.fsf@gnu.org> <87d25lc3xu.fsf@building.gnus.org> <877fvtc2qj.fsf@building.gnus.org> <83wq3s9rmr.fsf@gnu.org> <878ug72064.fsf@building.gnus.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1423499852 6230 80.91.229.3 (9 Feb 2015 16:37:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 9 Feb 2015 16:37:32 +0000 (UTC) Cc: rudalics@gmx.at, emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 09 17:37:28 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YKrKx-0000Bo-Ht for ged-emacs-devel@m.gmane.org; Mon, 09 Feb 2015 17:37:27 +0100 Original-Received: from localhost ([::1]:33709 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKrKw-0000bt-Tu for ged-emacs-devel@m.gmane.org; Mon, 09 Feb 2015 11:37:26 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52671) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKrKf-0000bg-Tt for emacs-devel@gnu.org; Mon, 09 Feb 2015 11:37:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YKrKc-0004Jk-BJ for emacs-devel@gnu.org; Mon, 09 Feb 2015 11:37:09 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:63506) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKrKc-0004Gn-3D for emacs-devel@gnu.org; Mon, 09 Feb 2015 11:37:06 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NJI00L00J400Z00@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Mon, 09 Feb 2015 18:37:04 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NJI00KW2JHSZA30@a-mtaout20.012.net.il>; Mon, 09 Feb 2015 18:37:04 +0200 (IST) In-reply-to: <878ug72064.fsf@building.gnus.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.166 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:182708 Archived-At: > From: Lars Ingebrigtsen > Cc: rudalics@gmx.at, emacs-devel@gnu.org > Date: Mon, 09 Feb 2015 15:12:19 +1100 > > Eli Zaretskii writes: > > > I think I can make it faster if we add an additional optional argument > > that tells vertical-motion the X coordinate at point. vertical-motion > > invests a lot of cycles in finding a place whose X coordinate is > > known, so providing that for its starting point will avoid all that > > effort. Will this help you, i.e. can you provide such a value with > > each call? > > Sure, I would normally call `vertical-motion' from `beginning-of-line' > (that is, I'm currently calling it from the first character on the line, > because that's faster), so I could pass in 0 as the X coordinate. Please try the latest master, where I implemented that. Contrary to what I wrote above, I decided to interpret the additional argument in the same units as the COLS element of the cons cell that is the first argument. I think this is better for consistency and also more convenient, since both values are in the same units and both can be floats, so no accuracy is lost. I'd be interested to know if this produces a noticeable speed-up.