• 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: Approaches for this Matching Problem?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Approaches for this Matching Problem?


  • Subject: Re: Approaches for this Matching Problem?
  • From: Jerry Krinock <email@hidden>
  • Date: Sun, 21 Jun 2009 21:02:51 -0700

Given the numbers in your post, "3-5", "250" and "several", I'd say you should just split the phrase into words, write an outer loop for(words in phraseWords), an inner loop for(tag in tags), and inside it all compare using -isEqualToString, breaking when found. "Just do it."

You won't even know that this happened unless you log the millseconds. I'd bet that the amount of time you spend writing this code is going to exceed the the CPU minutes consumed by 10,000 users doing 100 searches per day over the 5-year life your app.

Only thing that might require a little digging -- I believe that there is probably a "correct" way to split a phrase into a set or array of words which will work for non-Western languages. -[NSString componentsJoinedByString:@" "] would be a cheesy solution.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Approaches for this Matching Problem?
      • From: Ken Thomases <email@hidden>
References: 
 >Approaches for this Matching Problem? (From: Steve Cronin <email@hidden>)

  • Prev by Date: Approaches for this Matching Problem?
  • Next by Date: Re: Show the dock icon's context menu:
  • Previous by thread: Approaches for this Matching Problem?
  • Next by thread: Re: Approaches for this Matching Problem?
  • Index(es):
    • Date
    • Thread