[cairo] perf: long dashed lines

Behdad Esfahbod behdad at behdad.org
Tue Feb 5 17:18:17 PST 2008

On Tue, 2008-02-05 at 16:33 -0800, Vladimir Vukicevic wrote:
> One more...
> This is somewhat minor speed-wise, but it may help a lot more on FPU- 
> less platforms.  If the line segment we're dashing is entirely out of  
> bounds, just run the dasher through the loop without calculating each  
> individual dash segment.  (This could be further optimized by figuring  
> out the total length of the dash pattern, figuring out the remainder  
> from 'remain', and just running with that bit instead of looping over  
> the entire line segment, but that's going to be an even smaller win.)

Looks good.  Go ahead.

Did you get any real numbers on these yet?


>      - Vlad

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759

More information about the cairo mailing list