| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On Feb 26, 2007, at 10:30 AM, George Warner wrote: On Sun, 25 Feb 2007 11:37:21 -0800, Shawn Erickson <email@hidden> If at all possible use atomic operators (great for ref-count modifiers); I'd say exactly the opposite: One newbie mistake that I often see is not locking sufficiently, and trying to optimize away synchronization before ensuring correctness. Make your code correct using whatever locking mechanisms your framework provides; e.g. in Cocoa, for example, use NSLock, NSRecursiveLock, and @synchronized as appropriate. Then, after measuring your performance, if your measurements indicate that synchronization is resulting in significant delays, and it's not for architectural reasons (such as a bunch of threads all hitting a single shared resource) then consider dropping down a layer to see if you can optimize your synchronization itself. Usually your best optimization opportunities in this space are architectural and algorithmic. -- Chris |
_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/xcode-users/email@hidden This email sent to email@hidden
| References: | |
| >Re: multithreading, dual-core (From: George Warner <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.