(svn r3555) -Codechange: [Big Endian] removed defining OTTD_ALIGNMENT by default on Big Endian CPUs
authorbjarni
Sun, 05 Feb 2006 14:18:28 +0000
changeset 2980 598420e23b40
parent 2979 3ddf7c78d469
child 2981 ca5959cf9fc7
(svn r3555) -Codechange: [Big Endian] removed defining OTTD_ALIGNMENT by default on Big Endian CPUs
this increased speed when reading unaligned data (like strings)
test showed this to increase speed by 5,6% when drawing the mini map on PPC OSX

the tradeoff is that now it will crash if a Big Endian computer don't support unaligned reading
but it should easily fixable in stdafx.h if it turns out to be a problem
stdafx.h
--- a/stdafx.h	Sun Feb 05 11:54:25 2006 +0000
+++ b/stdafx.h	Sun Feb 05 14:18:28 2006 +0000
@@ -201,7 +201,6 @@
 
 // Setup alignment and conversion macros
 #if defined(TTD_BIG_ENDIAN)
-# define OTTD_ALIGNMENT
   static inline uint32 TO_LE32(uint32 x) { return BSWAP32(x); }
   static inline uint16 TO_LE16(uint16 x) { return BSWAP16(x); }
   static inline uint32 FROM_LE32(uint32 x) { return BSWAP32(x); }