comp.lang.ada
 help / color / mirror / Atom feed
From: john@peppermind.com
Subject: Performance of static array in record on GNAT / gcc 4.6
Date: Tue, 11 Dec 2012 02:53:28 -0800 (PST)
Date: 2012-12-11T02:53:28-08:00	[thread overview]
Message-ID: <b4ce1811-f8b0-474c-a2e6-19688cb69185@googlegroups.com> (raw)


Before I do the measurement myself, I wondered whether someone else has already done it. Question: If I pass a record with two large, fixed size arrays with definite values to a procedure as in parameter, is there any performance penalty for accessing elements of the arrays inside the record and procedure as opposed to defining the arrays directly inside the procedure and without wrapping them into a record? 

I'm using GNAT/gcc 4.6 with -O3 and Pragma Optimize (time)

I'm working on a (toy) virtual machine/interpreter where every cycle counts. 

Thanks for any advice!

P.S.: In case someone asks, yes, I'm considering using assembler but for the time being would like to keep it portable.



             reply	other threads:[~2012-12-11 10:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-11 10:53 john [this message]
2012-12-26 15:15 ` Performance of static array in record on GNAT / gcc 4.6 Florian Weimer
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox