Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!umd5!purdue!i.cc.purdue.edu!j.cc.purdue.edu!pur-ee!uiucdcs!uxc.cso.uiuc.edu!uxe.cso.uiuc.edu!mcdonald From: mcdonald@uxe.cso.uiuc.edu Newsgroups: comp.lang.c Subject: Re: volatile isn't necessary, but it's Message-ID: <225800020@uxe.cso.uiuc.edu> Date: 16 Apr 88 15:10:00 GMT References: <7794@alice.UUCP> Lines: 32 Nf-ID: #R:alice.UUCP:7794:uxe.cso.uiuc.edu:225800020:000:1770 Nf-From: uxe.cso.uiuc.edu!mcdonald Apr 16 09:10:00 1988 >>In article <7794@alice.UUCP> dmr@alice.UUCP writes: >>Has anyone else noticed that a lot of the more peculiar things that X3J11 >>has added (volatile, and especially noalias) are there for the >>benefit of compiler writers and benchmarkers, and not for the user? ........... >It seems the compilers are now doing things like unrolling loops with >constant bounds, and generating in-line code for what are supposed to >be library routines, like strcpy and memcpy. This makes for much >faster benchmarks, but makes large (source) programs generate such >large object files that they no longer fit in the target systems' >memory space. I think it HIGHLY desirable that compiler vendors provide the tools to get the fastest running programs! I and my students get tired of waiting 30 minutes to hours for some program to run! The MS-DOS compiler business has gotten so competitive that the users are being well served indeed! In the Microsoft case, you've got /Ox (breaks quite a bit of code because they haven't implemented "noalias" :-) ) which is equivalent to /Oailt /Gs, which implements, in order, optimizations unsafe in the presence of aliases, inline expansion of certain things, loop optimizations, and general optimization for fastest time, plus the /Gs to remove run-time stack checking. On the other hand, they have /Os, which optimizes for smallest size (but only makes a small difference). The BIGGEST gain in speed in some cases also reduces size: /Gc, which changes to globally using a more efficient calling convention, but also requires declaring certain thing with the "cdecl" keyword, which in turm starts another religious war in "comp.lang.c" :-) :-) I think that these people should be congratulated, not pilloried! Doug McDonald