Re: Quartz/memory benchmarks...
Re: Quartz/memory benchmarks...
- Subject: Re: Quartz/memory benchmarks...
- From: Paul Fox <email@hidden>
- Date: Thu, 27 Jun 2002 14:30:43 +0100
>
On torsdag, juni 27, 2002, at 11:22 , Paul Fox wrote:
>
>
> My initial results show that string drawing is a killer [...]
>
>
>
> This is using [NSString drawAt:]. I have experimented with directly
>
> calling the NSLayoutManager and as yet I am 25% slower than NSString, so
>
> I am missing some optimisations.
>
>
I also found string drawing rather slow and so switched to
>
CGContextShowGlyphs(), which is faster.
>
>
Unfortunately I have to provide glyphs rather than strings, and CGGlyph
>
(as the function expect) is not the same as an NSGlyph, so you can't
>
just typecast the result from e.g. NSLayoutManager...
>
>
And resorting to using the Core Graphics is rather irritating when one
>
wants to use Cocoa -- not to mention that using the more low-level API
>
is often not enough to speed up things...
>
>
> I think Apple should carry on with Cocoa and provide a complete new
>
> API with none of the anti-aliasing, floating-point co-ords crap and
>
>
I wouldn't really go that far... anti-alias is a must today, and I'm not
>
sure foating point itself slows it down. At least for x86 processors I'm
>
told they handle floats faster than integers.
>
>
Btw: you can actually disable anti-alias by calling setShouldAntiAlias
>
on your current NSGraphicsContext. Though i don't know if it provides a
>
speed-up.
Yes - antialiasing gives a 50% performance increase.
I am experimenting with CG and getting some good results. If I can
just get my transformation matrixes right I would be able to quote
results.
Personally - I find anti-aliasing on my iBook looks horrible and blurry.
regards
>
>
+-------------------------------------------------------------------------+
| CRiSP - Flexible editor | CRiSP, syn. for BRIEF |#
| | Internet: email@hidden |#
| If you get no reply for | WWW: (mine)
http://www.crisp.demon.co.uk |#
| support, please check your | WWW:
http://www.crisp.com |#
| Reply-To: email address. | WWW:
http://www.pacemaker.co.uk |#
+-------------------------------------------------------------------------+#
###########################################################################
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.