From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,d5d5f3072adbb376 X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2001-05-31 14:53:24 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!news.gtei.net!news.compaq.com!news.cpqcorp.net!not-for-mail Message-ID: <3B16BD4E.482B336A@zk3.dec.com> From: Jeff Sullivan X-Mailer: Mozilla 4.77 [en] (X11; U; OSF1 V4.0 alpha) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.unix.tru64 Subject: Re: Compaq C++ optimizer weakness References: <5l41f9.m3v.ln@bizon.peterstar.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Thu, 31 May 2001 17:53:18 -0400 NNTP-Posting-Host: 16.141.0.178 X-Complaints-To: abuse@Compaq.com X-Trace: news.cpqcorp.net 991345997 16.141.0.178 (Thu, 31 May 2001 14:53:17 PDT) NNTP-Posting-Date: Thu, 31 May 2001 14:53:17 PDT Organization: Compaq Computer Corporation Xref: archiver1.google.com comp.unix.tru64:2374 I asked the Compaq C++ team about this and got the following reply: We consistently test our compilers on the Stepanov benchmark internally, and have for at least the past two years been able to produce low abstraction penalties in the range of 1.00 - 1.04. However, to obtain this penalty, we require that you add two more options -tused and -inline all. -tused asks the compiler to add the template instantiations into the object file (as opposed to creating them in a repository which is the deault) and -inline all helps fine-tune our internal inlining heuristics. With these two additional options, this is what I see: > a.out test absolute additions ratio with number time per second test0 0 0.20sec 250.01M 1.00 1 0.20sec 250.01M 1.00 2 0.22sec 230.78M 1.08 3 0.20sec 250.01M 1.00 4 0.22sec 230.78M 1.08 5 0.20sec 250.01M 1.00 6 0.22sec 230.78M 1.08 7 0.20sec 250.01M 1.00 8 0.22sec 230.78M 1.08 9 0.20sec 250.01M 1.00 10 0.22sec 230.78M 1.08 11 0.20sec 250.01M 1.00 12 0.22sec 230.78M 1.08 mean: 0.21sec 240.94M 1.04 Total absolute time: 2.70 sec Abstraction Penalty: 1.04 We are working on not requiring the user to add the two additonal options, but we do not have a firm deadline on this goal. -model ansi is a new object model which produces objects incompatible with objects generated from older C++ versions (The default object model, -model arm, has limitations in its design. The new object model will allow us to be fully compliant with the ANSI/ISO C++ standard). We suggest that you use the -model ansi option only if you can recompile all your sources and libraries. We have NOT specifically added any optimizations exclusively to the new object model, such that it produces code faster than the older one. However, note that the new object model was designed to be more efficient than model arm.