Re: Reading in dictionary from txt file: options for speed
Re: Reading in dictionary from txt file: options for speed
- Subject: Re: Reading in dictionary from txt file: options for speed
- From: Michael Ash <email@hidden>
- Date: Tue, 14 Apr 2009 19:26:35 -0400
On Tue, Apr 14, 2009 at 7:18 PM, Kyle Sluder <email@hidden> wrote:
> On Tue, Apr 14, 2009 at 7:09 PM, Michael Ash <email@hidden> wrote:
>> This is not so. It's extremely rare to find a platform which
>> *requires* aligned access, and you certainly won't find one running OS
>> X. What's more common is finding a platform which *prefers* aligned
>> access, punishing misaligned access with significantly slower
>> operation. Even in those cases, "misaligned" means using an address
>> that isn't a multiple of your data type's size. Since char is always
>> one byte by definition, it is impossible to have a misaligned char
>> pointer.
>
> x64 requires certain alignments:
> http://software.intel.com/en-us/articles/data-alignment-when-migrating-to-64-bit-intel-architecture/
That has to be the most confusing technical document I've ever seen.
I'm not certain, but after reading it about three times, I'm pretty
sure that it's discussing data alignment on IA-64 (Itanium), not
x86-64. Microsoft certainly thinks that x86-64 supports unaligned data
access, with speed penalties:
http://msdn.microsoft.com/en-us/library/aa290049.aspx
And a quick test confirms that my Mac Pro, at least, has no trouble
reading a misaligned int pointer.
Mike
_______________________________________________
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