Hi Julius,

If I understand your problem correctly you are:
        1) processing a very large amount of intergers
        2) using highly optimized code that is:
            a) you are manipulating the data directly via pointers
            b) the data in memory is expected to be in a specific
               order/structure
            c) the data is stored on disk in pure binary form
               that is the same format as in memory

Several years back I had optimized the code of a C program and gained a
speed bump by the factor of 100 by doing the above and doing the pointer
arithmatic by hand for accessing the data in the structure instead of using
builtins and standard structures.

So you do not need to worry about the size of your data just how you access it, I had to have the program work on different architectures with different word sizes. The inital data where in text for so the conversion to integer was easy. The trick was to use the sizeof function to get the correct values for the pointer math.

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.

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.

Hope this helps.

        Keith.

_______________________________________________

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