Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Andi Kleen <andi <at> firstfloor.org>
Subject: Re: [RFC] Documentation about unaligned memory access
Newsgroups: gmane.linux.kernel
Date: Friday 23rd November 2007 02:07:05 UTC (over 9 years ago)
Robert Hancock  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
 
CD: 3ms