Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
xxmicloxx547y@kenogo Where do you get the idea that java is slow? IIRC, it's actually quite fast (the RAM thing is true though)
-
xxmicloxx547y@kenogo The JVM uses JIT compilation, which means that, theoretically, it could be even faster than C++, because a JIT compiler can perform more optimizations than a normal compiler. However, Java isn't as fast as C++, probably because it is not as optimized and because it uses a GC.
-
mt3o19137yUnused ram is wasted ram. Get a container, assign it some ram, problem solved.
Java is faster than c++ because you can ship faster. Pure java is way faster than cpp without fancy memory management and concurrency tricks. Good cpp code is indeed faster than java, but then you should be working on low level stuff not client/business oriented. Think of drivers, kernel or cpu microcode. For me - you waste you time and skills. -
denisal1007yblla blla Java is faster than C++, do you guys even code? how's Java faster than C++? really? so why isn't Java used for 3A games?
-
devios157017yWtf are you guys talking about? How is a JIT compiler able to perform more optimizations than a regular compiler? It's still a compiler, it just runs "in time" instead of up front.
-
xxmicloxx547y@devios1 Because a JIT compiler can analyze the control flow of your application better than a normal compiler can, and therefore do better inlining etc
-
denisal1007y@inukinator I dont think Minecraft is a 3A game, I know that its famous but its pixel/blocks based and has nothing to do with being 3A game! compare Minecraft graphics and physics with CoD or Battlefield and learn the difference.
-
mt3o19137yThese days games are written in scripting languages and communicating with low-level layer. Like quake and unreal have their versions of javascript. Lower layers, therefore, are written in low level languages. With hard coded optimizations, like bypassing cpu's branch prediction or loop unrolling. Or pushing some calculations to GPU if it's worth to do so.
Do you guys even know how does recent CPU works? It's nowhere near CISC architecture you used to learn about. They are full fledged RISCs with powerful translation unit but allowing you to write your own after-translation low level code. Java will never even allow you to do that. However it might detect your loop could be paralleled or done using different asm commands if CPU handles those instructions. It's something 'compile once reuse the binary' will never do. Check how many optimizations are allowed by compilers. Check how Gentoo performance increases when switching from generic i686/amd64 to flags dedicated for your cpu. -
mt3o19137y@inukinator for starters, go through Gentoo Handbook and full GCC manual. This should be good for the start.
Then read some books about modern (post pentium 3) cpu architecture. This should give you some deep insight. Then - go to Intel or AMD with this questions.
Related Rants
Oh Java, go have Java ☕
undefined
java
ram
memory monster