On 12 Jan 09, at 14:51, Schultz Keith J. wrote:
Far as stuffing two 32-bit values into a 64-bit value to avoid possible context switching is probaly a very bad trade off as the handling to such values and doing any kind of math with will hurt you badly speed wise with no space savings.

"Premature optimization is the root of all evil." -- Knuth

Optimization for space, in this case. Simply declaring the array to contain 32-bit values is just as efficient in terms of storage space, and it will probably perform better (as well as being easier to write).

Of course if you can do the math with bitwise operation directly you could process two integers at one time. But, I do not know exactly what you are up to.

If speed is actually a concern, vector operations are *much* more efficient for this sort of thing than any bitwise hacks could possibly be. Look up Accelerate.framework for details.
_______________________________________________

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

Reply via email to