Answer the question
In order to leave comments, you need to log in
Noob thoughts about interpreted Java\python\c# and compiled c++\c etc?
Interpreted language - goes through 2 stages instead of one (interpretation into byte code and compilation), compiled language - 1 stage (compilation).
The interpreter (example jvm) still compiles the bytecode and gets the same as if we wrote in C.
That is, if you write a code that will simply add two numbers and display the result in java and in c.
The compilation algorithm is:
prog.java -> prog.bytejava -> prog_byte.asmbl
prog.c -> --------------------- ->
prog.asmbl is that if you run prog_byte.asmbl and prog.asmbl, their execution time will be the same?
After all, 90+% of the game is textures, which means that this should be done by the video card, not the processor.
Does that mean that a compiled game in Java can not be inferior in performance to a game written in C ++?
Answer the question
In order to leave comments, you need to log in
What makes you think that 90% of the game is textures?
What does "make textures" mean? The video card will stamp textures for you, but what to do with them? Who will calculate what to output, in what order, why?
How exactly does java communicate with the graphics card? It cannot send to it directly, at least your program must communicate with the video card driver.
And before the video card driver, you can use a graphics framework, otherwise you need to study optics, 3D modeling, geometry at such a level that you will start writing a game in 10-15 years.
And for C ++ for Windows, there is a ready-made DirectX that will do 90% of the work for you. And under java there is no DirectX ...
In general, you are not quite trying to calculate.
Interpreted language - goes through 2 stages instead of one (interpretation into byte code and compilation), compiled language - 1 stage (compilation).
https://habrahabr.ru/post/105199/
- here the performance of the interpreted languages java and js is tested
one and a half times lower than si
Before you look for performance improvements in the compiler, you need to make sure that your code itself already uses the most efficient solutions. And when everything in your algorithms and data storage methods is IDEAL, then we start thinking about compiling the project. The C# JIT compiler, for example, slows you down only on the first launch of the project (when the actual compilation into assembler takes place). Then all the brakes are already caused by the speed of the CLR (JVM in the case of Java) and the libraries themselves.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question