[antlr-interest] C++ beginner questions
iank at bearcave.com
Sun Oct 2 15:03:12 PDT 2005
> Oh, bloodless wars are fun :)
> Point in case, in our case Java parser was 2x faster
> than C++ parser...
My experience with Java scanners and other language like processing
tools (my Java disassembler, for examle) is that Java is slower than
C++. Another data point: I have a query language processor that is
implemented in Java that does tree-to-tree transformation to
optimize queries. Here again, Java is surprisingly slow. I would,
in fact, be nervous about implementing a compiler in Java because of
As I've written here before: it is a simple fact: Java has
interpretive overhead. For what ever reason Java string processing
also seems slow. So this clam that Java beats native code must
first address why the overhead of the interpreter is not an issue.
And don't feed me that line about the JIT compiler. JIT is fine for
long running servers. But a JIT compiler is not likely to do a run
once application like a compiler much good.
All this said, I use Java more these days than C++. There are many
applications which access databases or networks, where this overhead
is far and away the bottleneck. Here the amazing class libraries
available with Java make it a huge win.
More information about the antlr-interest