🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #537

Re: Perspective Mapper and Scaler Code...

#537
From: Warwick Allison
Date: Mon, 10 Aug 1992 03:37
44 lines
1341 bytes
mykes@amiga0.SF-Bay.ORG (Mike Schwartz) writes:

>Make 'em faint every 5 minutes! :)  How fortunate that goto maps to an
>instruction that is available on every CPU (or variant of the
>instruction): jmp, bra, jr, etc.  To ignore goto is like burying your
>head in the sand.  


Using unstructured branches (gotos) ruins optimisability.


Time this code:

	main()
	{
	  int i;

	#ifdef STRUCTURED
	  for (i=0; i<3000000; i++);
	#else
	  i=0;
	y:
	  if (i>=3000000) goto x;
	  i++;
	  goto y;

	x:;
	#endif
	}

using each of these:
	cc foo.c
	cc -DSTRUCTURED foo.c
	cc -O foo.c
	cc -O -DSTRUCTURED foo.c


--
Warwick
--
  _-_|\      warwick@cs.uq.oz.au            /Disclaimer:
 /     * <-- Computer Science Department,  /  
 \_.-._/     University of Queensland,    /      void (if removed)
      v      Brisbane, Australia.        /  
Technical Details
Message-ID: <9756@uqcspe.cs.uq.oz.au>
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!bunyip.cc.uq.oz.au!uqcspe!cs.uq.oz.au!warwick
References: <712851855.9378@zooid.guild.org> <1992Aug5.214216.6503@esds.mdc.com> <mykes.0bqk@amiga0.SF-Bay.ORG>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!bunyip.cc.uq.oz.au!uqcspe!cs.uq.oz.au!warwick
From: warwick@cs.uq.oz.au (Warwick Allison)
Newsgroups: rec.games.programmer
Subject: Re: Perspective Mapper and Scaler Code...
Message-ID: <9756@uqcspe.cs.uq.oz.au>
Date: 10 Aug 92 03:37:44 GMT
References: <712851855.9378@zooid.guild.org> <1992Aug5.214216.6503@esds.mdc.com> <mykes.0bqk@amiga0.SF-Bay.ORG>
Sender: news@cs.uq.oz.au
Reply-To: warwick@cs.uq.oz.au
Lines: 44