On 22/10/2010, at 2:19 PM, Abhi Beckert wrote:

> in this case — don't need to worry about performance or memory consumption — 
> as there won't ever be many products per category.

> How much does performance/memory suffer from using 
> filteredArrayUsingPredicate?

You state it doesn't matter, then you worry that it might.

With any question about optimisation, the question can only be answered by 
measuring the performance to see if it falls short of your requirements or not. 
Since you don't say what your requirements are and have not measured the 
performance against them, nobody can answer this.

All I will say is that on Mac (as opposed to iOS) filtering using a predicate 
is "fast enough" up to many thousands of objects and I've found it adequate for 
my needs, but YMMV. You'd probably be unable to match its performance by doing 
the filtering yourself, though you could beat it by changing your storage so 
that it is organised into sets that already match certain criteria. Also, as 
you're caching the result you'll only get hit once or whenever the predicate or 
content changes.

--Graham


_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to