emacs-devel
[Top][All Lists]
Advanced

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

Re: Pixel-based display functions


From: Eli Zaretskii
Subject: Re: Pixel-based display functions
Date: Mon, 09 Feb 2015 18:36:50 +0200

> From: Lars Ingebrigtsen <address@hidden>
> Cc: address@hidden, address@hidden
> Date: Mon, 09 Feb 2015 15:12:19 +1100
> 
> Eli Zaretskii <address@hidden> 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.



reply via email to

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