On 9 Nov 2009, at 10:49, Jeffrey Oleander wrote:
Last I looked, 1-bit count was an assembly/ hardware instruction. Getting the highest order on-bit required a little cleverness.
Take a look at __builtin_clz(). (It maps to 'bsr' on x86.) _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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 arch...@mail-archive.com