TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender: "Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
Date: Thu, 3 Dec 1998 02:17:40 +0100
Reply-To: Jerry van Dijk <[log in to unmask]>
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
From: Jerry van Dijk <[log in to unmask]>
Parts/Attachments: text/plain (28 lines)
>        Here's a C++ example to try:
...
>        Compile this with full optimization and look at the generated code!

This is not a good example, since there are no variables. So compiling
the c++ code results in:

        main:
                pushl %ebp
                movl %esp,%ebp
                pushl $720                      <--
                pushl $cout                     <--
                call __ls__7ostreamUl           <--
                addl $8,%esp
                pushl %eax
                call endl__FR7ostream
                movl $1,%eax
                movl %ebp,%esp
                popl %ebp
                ret
        .Lfe1:
                .size    main,.Lfe1-main
                .ident  "GCC: (GNU) 2.7.2.1"

Which says more about gcc's optimizer than about the templates... :-)

Jerry.

ATOM RSS1 RSS2