Charles-François Natali added the comment: >> Well, unaligned memory access is usually slower on all architectures :-) >> Also, I think some ARM architectures don't support unaligned access, so >> it's not really a thing of the past... > > On modern computers it's either not slower or just a tiny bit slower. > http://lemire.me/blog/archives/2012/05/31/data-alignment-for-speed-myth-or-reality/
I have other benchmarks that show slowdowns of more than 40%: http://www.alexonlinux.com/aligned-vs-unaligned-memory-access Also, x86 has optimized unaligned memory accesses, but the world isn't x86-only (once again, there's ARM, and AFAICT the performance hit can be quite high). Now, I perfectly understand that you don't want to mess with the implementation, but just don't say that "unaligned access doesn't matter, and is just a tiny bit slower". IMO the compile-time check is enough. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19183> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com