• 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
[OT] Premature optimizations (was: Where is NSList?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[OT] Premature optimizations (was: Where is NSList?)


  • Subject: [OT] Premature optimizations (was: Where is NSList?)
  • From: Allan Odgaard <email@hidden>
  • Date: Thu, 29 Jul 2004 13:50:43 +0200

On 29. Jul 2004, at 11:17, Steve Checkoway wrote:

I'd suggest using NSArray/NSMutableArray for ordered collections, and only worrying about their access characteristics if use and profiling of your application point to them as a performance issue.
This is a *very* naive view which may well lead to O(n^2) or worse implementations of O(1) problems!
Programmers are notorious for optimizing the wrong code.

What is your basis for that statement? which programmers are you referring to?

The pervious point was well made and perfectly valid.

I disagree. If you understand time complexity, you mostly do not need to profile your code to know how well it scales, and if you have reusable data structures, you do not need to spend extra time making it right from the start, rather than fix it when users complain that the app is useless for larger quantities of data, or just ignore the problem, which seems to be the case for half the apps I use... ;)

We have a lot of people which program whom doesn't have in depth knowledge about data structures and time complexity, and I think it's a disservice to these to almost label optimizations as a bad thing. What we could preach is how to do proper optimizations, and choosing the proper data structure is the first step, which was all the OP wanted...
_______________________________________________
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.


  • Follow-Ups:
    • Re: [OT] was: Where is NSList? (All Threads)
      • From: "Keith J.Schultz" <email@hidden>
    • Re: [OT] Premature optimizations (was: Where is NSList?)
      • From: Marcel Weiher <email@hidden>
    • Re: [OT] Premature optimizations (was: Where is NSList?)
      • From: m <email@hidden>
    • Re: [OT] Premature optimizations (was: Where is NSList?)
      • From: Stephen Checkoway <email@hidden>
References: 
 >Where is NSList? (From: Tim Conkling <email@hidden>)
 >Re: Where is NSList? (From: Shawn Erickson <email@hidden>)
 >Re: Where is NSList? (From: Tim Conkling <email@hidden>)
 >Re: Where is NSList? (From: Steve Checkoway <email@hidden>)
 >Re: Where is NSList? (From: Tim Conkling <email@hidden>)
 >Re: Where is NSList? (From: Dustin Voss <email@hidden>)
 >Re: Where is NSList? (From: Steve Checkoway <email@hidden>)
 >Re: Where is NSList? (From: Pandaa <email@hidden>)
 >Re: Where is NSList? (From: Steve Checkoway <email@hidden>)

  • Prev by Date: Re: Where is NSList? [off-topic]
  • Next by Date: What happens if I use 10.3 functions on 10.2?
  • Previous by thread: Re: Where is NSList? [off-topic]
  • Next by thread: Re: [OT] Premature optimizations (was: Where is NSList?)
  • Index(es):
    • Date
    • Thread