55

Oh Java, go have Java ☕

Comments
  • 5
    Replace Java with Chrome. Truer words have never been spoken.
  • 2
    @kenogo Where do you get the idea that java is slow? IIRC, it's actually quite fast (the RAM thing is true though)
  • 3
    @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.
  • 6
    Unused 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.
  • 2
    Hahaha I got a good laugh out of this :)
  • 2
    blla 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?
  • 0
    @denisal are you telling me, that Minecraft is not a trible A game?
  • 3
    Wtf 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.
  • 0
    @devios1 see a hybrid of AoT and JiT is where it's all at!
  • 0
    @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
  • 0
    @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.
  • 4
    These 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.
  • 1
    @denisal I was joking, and the blocky style is called voxel
  • 0
    @inukinator sorry dude that I didn't get that 😂😂
  • 0
    @mt3o now my question is, how do I find flags that work well with my cpu?
  • 1
    @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.
Add Comment