byte - Why is alignment imporant? -


i know processors fail misaligned data, , others oh-so-common x86, slower that.

my question why? why harder x86 processor data pointer 0x12345679 pointer 0x12345678? clear, i'm aware page faults may happen if data in multiple pages, , understand more data may need fetched memory (one part start of value , 1 end), isn't true , isn't question about. i'm asking, why slower?

suppose memory starts @ 0x10000000. why harder processor 2-byte short 0x10000001 0x10000002? why harder 4-byte int 0x10000001 0x10000000? , forth.

the processor can access memory in aligned fashion. consequence of how interconnect between processor , memory functions.

when processor supports unaligned reads, what's happening processor issuing 2 separate reads (or 1 read of larger size) , stitching parts together, why it's slower aligned read.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -