Difference between C++ and Java compilation process -
possible duplicate:
why c++ compilation take long?
hi,
i searched in google differences between c++ , java compilation process, c++ , java language features , differences returned.
i proficient in java, not in c++. fixed few bugs in c++. experience, noticed c++ took more time build compared java minor changes.
regards bala
there few high-level differences come mind. of generalizations , should prefixed "often ..." or "some compilers ...", sake of readability i'll leave out.
- c/c++ compilation doesn't read information binary files, reads method/type definitions header files need parsed in full (exception: precompiled headers)
- c/c++ compilation includes pre-processor step can wide array of text-replacement (which makes header pre-compilation harder do)
- the c++ syntax lot more complex java syntax
- the c++ type system lot more complex java type system
- c++ compilation produces native assembler code, lot more complex produce relatively simple byte code
- c++ compilers need optimizations because there isn't other thing them. java compiler pretty simple 1:1 translation of java source code java byte code, no optimizations done @ step (that's left jvm do).
- c++ has template language that's turing complete! (so strictly speaking c++ code needs run produce executable code , c++ compiler need solve halting problem tell if arbitrary c++ code compilable).
Comments
Post a Comment