Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: So how's Java these days? Still slow?

Author: Dann Corbit

Date: 14:57:57 05/10/02

Go up one level in this thread


On May 10, 2002 at 17:31:08, David Hanley wrote:

>On May 10, 2002 at 16:34:39, Dann Corbit wrote:
>
>>On May 10, 2002 at 08:37:28, Mark Christiaens wrote:
>>
>
>>>C/C++ compilers compile one source-code module at a time and cannot optimize
>>>over these boundaries.
>>
>>Not true, for a long time now.
>>
>>> JIT-compilers for Java see the whole application and can
>>>for example inline methods from other classes which were not available at
>>>compile time.
>>
>>So can C and C++ compilers.
>
>Interesting.  What compilers can rewrite code at runtime?  How is this done?
>Seems like you'd have to step beyond the object-file paradigm.

All of them, that I use.  Look at this (for instance) [from the Intel compiler
help files]:

Multifile IPO Overview
Multifile IPOs obtain potential optimization information from individual program
modules of multifile programs. Using this information, the compiler performs
optimizations across modules.

Building a program is divided into two phases: compilation and linkage.
Multifile IPO performs different work depending on whether the compilation or
linkage is being performed.

Compilation Phase -- As each source file is compiled, multifile IPO stores an
intermediate representation (IR) of the source code in a mock object file in a
special comment section. Generating mock files instead of real object files
reduces the time spent in the multifile IPO compilation phase. Each mock object
file contains the IR for its corresponding source file, but no real code or
data. These mock objects must be linked using the -Qipo option with the
compiler, or using the xilink tool. (See Creating a Multifile IPO Executable
Using a Project Makefile.)
 Note
Failure to link "mock" objects with -Qipo or xilink will result in linkage
errors. There are situations where mock object files cannot be used. See the
following section, "-Qipo Compilations With Real Object Files" for more
information.

Linkage Phase -- When you specify -Qipo, the compiler looks for the IR
information in the mock object files.
 Note
The compiler does not support multifile IPO for static libraries (.lib files).
See the following section, "-Qipo Compilations With Real Object Files" for more
information.

Analyzing the Effects of Multifile IPO
The -Qipo_c and -Qipo_S options are useful for analyzing the effects of
multifile IPO, or when experimenting with multifile IPO between modules that do
not make up a complete program.

Use the -Qipo_c option to optimize across files and produce an object file. This
option performs optimizations as described for -Qipo, but stops prior to the
final link stage, leaving an optimized object file. The default name for this
file is ipo_out.obj. You can use the -Fe option to specify a different name. For
example:

prompt>icl -G6 -Qipo_c -Fefile a.c b.c c.c

Use the -Qipo_S option to optimize across files and produce an assembly file.
This option performs optimizations as described for -Qipo, but stops prior to
the final link stage, leaving an optimized assembly file. The default name for
this file is ipo_out.asm. You can use the -Fe option to specify a different
name. For example:

prompt>icl -G6 -Qipo_S -Fefile a.c b.c c.c

For more information on inlining and the minimum inlining criteria, see Inline
Expansion of Library Functions



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.