[antlr-interest] C++ beginner questions

Peggy Fieland madcapmaggie at yahoo.com
Tue Oct 4 07:13:52 PDT 2005



--- Akhilesh Mritunjai <virtualaspirin at yahoo.com>
wrote:

> Static compilers (C/C++) do static optimizations.
> Can
> they make optimizations with regard to these
> patterns
> ? Nope! JVM (hotspot VM) now has a run-time profiler
> that provides feedback to JIT. 

Static compilers can do this too.  The HP PARISC
compilers have done this for years.  If you own the
compilers, the linker and the kernel you can really do
a lot.

>It can at run time
> find
> critical portions and optimize them through a number
> of ways implemented right now and in time to come.
> So
> the speed of execution on any non-trivial amount of
> input will increase over time... something that
> static
> compilers will never be able to do.

<grumble>.  See above.  

Not that it's not easier for Java.

> (That is exactly how java version of my compiler
> beat
> the C++ version. The input was 8MB script generated
> code. The JVM figured it out and optimized the
> particular code path while C++ one just kept
> fighting
> branch mispredictions and RefCount'ed GC overheads).
> 
> - Akhilesh

Peggy, happy to be coding in C++ instead of C and
asssembly language.
> 
> 
> 
> 		
> __________________________________ 
> Yahoo! Mail - PC Magazine Editors' Choice 2005 
> http://mail.yahoo.com
> 



More information about the antlr-interest mailing list