• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Speed of Quartz (was: optimizing compilers)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Speed of Quartz (was: optimizing compilers)


  • Subject: Re: Speed of Quartz (was: optimizing compilers)
  • From: email@hidden
  • Date: Mon, 4 Feb 2002 12:01:38 -0800

Here are two simple NSView subclasses. Both draw connected line segments
with 500 points using NSBezierPath -moveToPoint: and -lineToPoint:. A
reasonable expectation is that the first implementation is faster than the
second implementation. The first implementation avoids 500 allocations and
lots of attribute setting operations. If fact, the first implementation is
more than ten times SLOWER than the second implementation. NSBezierPath is
seriously broken.

Interesting. The question is, is this NSBezierPath's fault, or Quartz's? Or is this even considered correct behavior for some reason?
Certainly the rendering generated by the two methods is not identical. Drawing each line separately avoids doing line joins, of course. Additionally, I would suspect that the renderings will differ whereever two line segments cross each other, but I haven't tried this to confirm.
I think we're getting to the point where it would be nice to hear what a Quartz engineer has to say about all this! :->

Ben Haller
Stick Software


  • Follow-Ups:
    • Re: Speed of Quartz (was: optimizing compilers)
      • From: Finlay Dobbie <email@hidden>
  • Prev by Date: Re: Speed of Quartz (was: optimizing compilers)
  • Next by Date: Re: Speed of Quartz (was: optimizing compilers)
  • Previous by thread: Re: Speed of Quartz (was: optimizing compilers)
  • Next by thread: Re: Speed of Quartz (was: optimizing compilers)
  • Index(es):
    • Date
    • Thread