GCC's "-fno-strict-aliasing"? (Developers)
> > A compiler can use that to optimize and reorder statements and
> > assignments.
> > -fno-strict-aliasing turns of that optimization, IOW their code is
> dirty
> > and not ANSI C compatible.
>
> But why is, e.g., Zlib faster then, if -fno-strict-aliasing turns off that
> optimization?
Probably becuase the loop is hand tuned at a certain setting to perform maximally. Compiler reordering might work against it.
If you really want to know, do what all compiler hacks do. Find a piece of source where it matters, objdump both .o and diff.
(probably needs a small script to filter out changing assembler label numbers)
Complete thread:
- GCC's "-fno-strict-aliasing"? - rr, 17.09.2008, 18:01 (Developers)
![Open in board view [Board]](img/board_d.gif)
![Open in mix view [Mix]](img/mix_d.gif)
- GCC's "-fno-strict-aliasing"? - marcov, 18.09.2008, 10:30
- GCC's "-fno-strict-aliasing"? - rr, 18.09.2008, 11:37
- GCC's "-fno-strict-aliasing"? - marcov, 18.09.2008, 13:20
- GCC's "-fno-strict-aliasing"? - RayeR, 18.09.2008, 14:10
- GCC's "-fno-strict-aliasing"? - rr, 18.09.2008, 11:37
- GCC's "-fno-strict-aliasing"? - rr, 25.09.2008, 16:38
- GCC's "-fno-strict-aliasing"? - RayeR, 29.09.2008, 17:09
- GCC's "-fno-strict-aliasing"? - marcov, 18.09.2008, 10:30
Mix view