delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/14/13:48:14

From: joshv AT planet DOT net (Josh Vanderhoof)
Newsgroups: comp.os.msdos.djgpp,rec.games.programmer
Subject: Re: Any tips on optimizing C code?
Followup-To: comp.os.msdos.djgpp,rec.games.programmer
Date: 14 May 1997 16:24:50 GMT
Organization: B.C. Equipment, Landing, NJ
Lines: 13
Message-ID: <5lcp0i$cdj@jupiter.planet.net>
References: <33775c59 DOT 19219875 AT news DOT cis DOT yale DOT edu> <5la59v$11b AT news DOT webspan DOT net>
Reply-To: joshv AT planet DOT net
NNTP-Posting-Host: stan10.planet.net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

quark(particle) (quark AT webspan DOT net) wrote:
: if you're writing in DJGPP,, try compiling it with
: gcc -O yoursource.c -o exename.exe
: 
: It can actually give you a real boost in performance...

You should use "-O2 -fomit-frame-pointer" for the most
optimization in gcc.  You can also try "-funroll-loops" and
"-finline-functions", but they can waste enough cache to
decrease performance.

-- 
Josh Vanderhoof (joshv AT planet DOT net)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019