[antlr-interest] C++ beginner questions

Akhilesh Mritunjai virtualaspirin at yahoo.com
Mon Oct 3 08:32:28 PDT 2005


Hi Ian

--- Ian Kaplan <iank at bearcave.com> wrote:
>   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

Umm, basic question... do any of examples you quotes
here help you pay bills ? If yes, I think you can
easily calculate ratio of cost of one CPU hour to cost
of one HUMAN hour. 

Then take a complex project that takes, say, approx 3
man years of effort in Java Vs 4 man years for C++
(which includes debugging memory problems).

If I need to complete it in an year, I need to find 1
extra 'perfectly fitting' guy or 2 'fitting' guys, if
I use C++. Finding them is neither cheap nor easy!
OTOH, I can ring up my local shop in morning and have
them deliver 5 fast computers by lunch-time for the
cost of two *month* salary of one 'fitting' guy.

So unless C++ is so "ridiculously" fast that the cost
savings in machines outweights human time saving. 

Yes, I calculated it in hard figures.
No, even at 50X (thats times, not percent) speedup I
don't break even.
Yes, this is true even in India (Namaste! :-) )
No, We're not a body shop
Yes, I know C++ *very* well
No, I'm not a zealot by any stretch of imagination

Yes, I believe in principle that humans shouldn't be
*made* to do the work that machines can do.

-- Akhilesh



> 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
>   performance issues.
> 
>   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.
> 
>   Ian
> 



		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


More information about the antlr-interest mailing list