lkml.org 
[lkml]   [2007]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC] Documentation about unaligned memory access
From
Date
Robert Hancock <hancockr@shaw.ca> writes:
>
> Also, x86 doesn't prohibit unaligned accesses,

That depends, e.g. for SSE2 they can be forbidden.

> but I believe they have
> a significant performance cost and are best avoided where possible.

On Opteron the typical cost of a misaligned access is a single cycle
and some possible penalty to load-store forwarding.

On Intel it is a bit worse, but not all that much. Unless you do
a lot of accesses of it in a loop it's not really worth something
caring about too much.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-11-23 03:11    [W:0.914 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site