Article View: gnu.misc.discuss
Article #2209alloca(), efficiency, 386 conventions
From: David Vinayak Wallace
Date: Mon, 04 Jun 1990 06:02
Date: Mon, 04 Jun 1990 06:02
15 lines
1539 bytes
1539 bytes
Dick: First of all, gnu.misc.discuss is for non-technical discussions. I'm pointing followups to bug-gcc. The answer is that with a little compiler fiddling you can win. You make the compiler drop a frame pointer for functions which call alloca. Yes, the compiler has to know about alloca, but it's an optimisation no worse (IMAO) than having the compiler unpack, say, printf. I asked rms about this; gcc should be able to do it now. I don't think that it slows your program down; certainly a few functions would have to init the fp on entry, but surely that's a lot faster than calling malloc and free! You'd have to get concrete numbers from your application of course.
Technical Details
Message-ID:
<GUMBY.90Jun3230213@Cygnus.COM>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!shelby!neon!neon!gumbyReferences:
<1990Jun1.200904.7850@ico.isc.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1025b4,f3ff59336294a7a3 X-Google-Attributes: gid1025b4,public X-Google-Thread: 113d02,728128d361e8c4e4,start X-Google-Attributes: gid113d02,public X-Google-ArrivalTime: 1990-06-04 07:53:55 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!shelby!neon!neon!gumby From: gumby@Cygnus.COM (David Vinayak Wallace) Newsgroups: gnu.misc.discuss,gnu.gcc.bug Subject: alloca(), efficiency, 386 conventions Message-ID: <GUMBY.90Jun3230213@Cygnus.COM> Date: 4 Jun 90 06:02:13 GMT References: <1990Jun1.200904.7850@ico.isc.com> Sender: news@Neon.Stanford.EDU (USENET News System) Reply-To: bug-gcc@prep.ai.mit.edu Followup-To: gnu.gcc.bug Distribution: gnu Organization: Cygnus Support Lines: 15 Posted: Mon Jun 4 07:02:13 1990 In-Reply-To: rcd@ico.isc.com's message of 1 Jun 90 20:09:04 GMT