[Scummvm-devel] Wii & Gamecube (resp. PowerPC) vs. unaligned memory access

Johannes Schickel lordhoto at scummvm.org
Mon May 9 16:03:56 CEST 2011


> > Hm, I can't seem to find that in the email archive nor do I recall it
> > (the latter means nothing, just that my memory is as leaky as usual
> > *sigh*). Can you point me to where that was discussed? Would be
> > interesting to know and record (this time in a comment in endian.h,
> > maybe) on which systems specifically there were noticeable or even
> > "serious" slowdowns.
> 
> OK that might be my memory playing tricks on me as well. It's also
> possible that I got that impression from reading a bunch of material
> on the web at the time. I seem to remember some ScummVM folks telling
> me it wasn't a good idea to use -fno-strict-aliasing after I submitted
> it, but I can't remember when or who, and it's not really that
> important.
> 
> I can't really say that I noticed slowdown on the PSP in the brief
> period that I had no-strict-aliasing on, but again that was a while
> ago. The Linux kernel compiles with no-strict-aliasing, so it can't be
> that bad. I think it's more of a psychological thing -- since I've
> been hunting for optimizations for so long, I can't bring myself to
> say that it's ok to turn off a feature that is used for compiler
> optimizations.
> 

In fact compiler manuals usually suggest that strict ANSI aliasing rules help 
in optimizing the program. Whether there is any real difference for us is 
another story though.

// Johannes




More information about the Scummvm-devel mailing list