Re: NSMapTable with C strings as keys
Re: NSMapTable with C strings as keys
- Subject: Re: NSMapTable with C strings as keys
- From: Jens Alfke <email@hidden>
- Date: Thu, 30 May 2013 08:49:21 -0700
On May 30, 2013, at 3:52 AM, Ian Joyner <email@hidden> wrote:
> What I am trying to point out though is that there is a misapprehension that premature optimization means writing structured code early on so don't structure it because you can always go and clean it up later. Rather I think we should write well-structured code as we go.
I agree 100% with that. Structured code is easier to benchmark and optimize later on, anyway — as I said, if you repeat a piece of code ten times, none of the ten instances may show up individually as hot spots, whereas if you called a common function/method in ten places, it may show up and then be easy to fix.
I would add, though, that the perfect structure (class hierarchy, API, factoring…) may not be apparent right away, especially since you’ll often end up refactoring as you go along. So trying too hard to structure code as you’re initially writing it can end up being a rathole.
—Jens
_______________________________________________
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