Article View: comp.os.linux.misc
Article #55Re: Two things, RedHat + Linux efficiency
From: James Youngman
Date: Wed, 13 Mar 1996 10:41
Date: Wed, 13 Mar 1996 10:41
18 lines
1058 bytes
1058 bytes
In article <4i5lev$fd3@agate.berkeley.edu>, nickkral@america.CS.Berkeley.EDU says... > >In article <4lFXuqq00aw=M=iUNp@andrew.cmu.edu>, >Nicholas P Konidaris <npk+@andrew.cmu.edu> wrote: >>for (cnt = 0; cnt < 50000; cnt++) >> x = x + 1 >Note 2: If you were to run "gcc -O2 blah...", that should reduce the >loop to: > > cnt = 50000; > x = 50000; This turns out not to be the case in the example of GCC since it specifically recogniises this construct as a timing loop and therefore doesn't optimise it away. Neat, eh? James Youngman
Technical Details
Message-ID:
<4i68p5$hlc@halon.vggas.com>Path:
arc1-ca.pugleaf.net!halon.vggas.com!newsReferences:
<4lFXuqq00aw=M=iUNp@andrew.cmu.edu> <4i5lev$fd3@agate.berkeley.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!halon.vggas.com!news From: JYoungman@vggas.com (James Youngman) Newsgroups: comp.os.linux.misc,comp.lang.c Subject: Re: Two things, RedHat + Linux efficiency Date: 13 Mar 1996 10:41:41 GMT Organization: VG Gas Analysis Systems Message-ID: <4i68p5$hlc@halon.vggas.com> References: <4lFXuqq00aw=M=iUNp@andrew.cmu.edu> <4i5lev$fd3@agate.berkeley.edu> NNTP-Posting-Host: 132.147.163.4 Mime-Version: 1.0 Content-Type: Text/Plain; charset=US-ASCII X-Newsreader: WinVN 0.99.7