Since its inception, Microsoft Excel has changed how people organize, analyze, and visualize their data, providing a basis for decision-making for the flying billionaires heads up in the clouds who don’t give a fuck for life offtheline

    • Aceticon@lemmy.world
      link
      fedilink
      English
      arrow-up
      8
      arrow-down
      3
      ·
      edit-2
      1 year ago

      I used to make high performance distributed computing server-systems for Investment banks.

      Since the advent of Just In Time compiling, Java isn’t slow if properly used.

      It can however be stupidly slow if you don’t know what you’re doing (so can something like Assembly: if you’re using a simple algorithm with a O(n) = n^2 execution time instead of something with O(n) = n*log(n) time, it’s going to be slow for anything but a quantum computer, which is why, for example, most libraries with sorting algorithms use something more complex than the silly simple method of examining every value against every other value).

      • Valmond@lemmy.mindoki.com
        link
        fedilink
        English
        arrow-up
        6
        arrow-down
        1
        ·
        1 year ago

        Just because you can make slow assembler doesn’t make Java fast.

        Java is clunky and not fast compared to C++ which is clunky and fast, Python which isn’t clunky but slow bla bla bla bla…

        • Aceticon@lemmy.world
          link
          fedilink
          English
          arrow-up
          8
          arrow-down
          1
          ·
          edit-2
          1 year ago

          That’s oversimplifying things.

          For things like algorithms Java can be as fast as C++ because ultimatelly it all ends up as the same assembly code: the differences in performance between one and the other are within the same range as the differences in performance between different C++ compilers or even optimization flags chosen and ultimatelly boil down to how good the implementation of the Java Virtual Machine is for a specific architecture (things like whether the generated assembly takes in account the way the microcontroller handles conditional jumps and cache misses).

          Were Java is slower than C++ is in things like memory management: even the best garbage collection will never beat the kind of carefully handcrafter managing of memory that you can do in C++, though the upside of the different memory management architecture in Java is that your programs don’t just start behaving in weird ways because you incorrectly accessed a variable in stack using a pointer and overwrote other stuff or even the function return address.

          Then again if performance is your greatest consideration you would go for C, not C++ (note that I didn’t say Assembly, as good C compilers are actually better at optimizing than most Assembly programmers).

          • Valmond@lemmy.mindoki.com
            link
            fedilink
            English
            arrow-up
            2
            arrow-down
            2
            ·
            1 year ago

            Well that was a lot of misconceptions.

            So compiler will make java as fast as C++ but not C++ as fast as C?

            Also, when speed matters it’s never great to have huge Java classes, it just won’t be optimised away (anough) and you’ll have a memory / bus bottleneck.

            Also, if you really want speed you go parallel, IDK if java is up for the challenge lol (can you configure stackspace and so?) or to beat them all, you run it on the GPU (or several GPU lol :-)

            • Aceticon@lemmy.world
              link
              fedilink
              English
              arrow-up
              6
              arrow-down
              1
              ·
              1 year ago

              I think I didn’t explain myself correctly.

              The Just In Time Compiler in a Java Virtual Machine which does a final compilation step at runtime from JVM assembly to native code will make the typical code in algorithms run as fast as in C++ because ultimatelly they both end up as the same assembly. I’ve actually measure this by the way, though it was years ago.

              However things like memory architectures are different between those languages and the one in C++ can easilly be made faster than in Java, though the downside of that memory architecture is nastier bugs.

              Further, and this time about general performance, if you’re worried about performance above all, then in terms of general performance, C is generally faster than C++: for example virtual functions in C++ objects have calling overheads which function calls when there is no inheritance do not have so unless you don’t use inheritance at all, some function calls in C++ will be slower.

              As for parallelization, I’ve actually worked both in massive parallel Java with distributed computing and GPU computing and they’re completelly different kinds of parallelization with different capabilities and optimal use cases: good luck making a CUDA application optimized for serving paralled requests from millions of clients sourcing data from multiple sources and good luck making an LLM runtime with distributed computing in Java were parts of the pre-trained neural network are in different machines - GPU computing can’t arbitrally decide it needs some data and fetch it whilst the overhead of synching two parts of a Java system running in different machines is way (millions of times?) larger than the overhead of synching read-then-write-access to the same position in a RWStructuredBuffer from 2 different processing units.

              Comparing these two kind of parallelism is not an apple and oranges comparison, it’sm more like an apples and horseshoes comparison.

      • Milady@lemmy.world
        link
        fedilink
        English
        arrow-up
        16
        arrow-down
        1
        ·
        1 year ago

        I mean, whatever speed java has or doesn’t have, what the other person said was emulate, you’ll have your os then on top of that the JVM then on top of that your python implementation, then finally the python code. If that’s faster than os->python imp…

        • Aceticon@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 year ago

          Just like Python doesn’t run from the source code through the interpreter all the time (instead, if I’m not mistaken, the interpreter pass converts the code to a binary runtime form, so interpretation of the source is done only once), so does “modern” Java (I put modern between quotes because it’s been like that for almost 20 years) convert the code in VM format to binary assembly code in the local system (the technology is called JIT, for Just-In-Time compiler).

            • Phrodo_00@lemmy.world
              link
              fedilink
              English
              arrow-up
              10
              arrow-down
              1
              ·
              edit-2
              1 year ago

              If you go that detailed, then the jvm is JIT compiler, not an interpreter, so Java code still mostly runs natively on the processor. Java is quite fast achieving pretty close performance to C++, the only noticeable problems are on desktop because of the slow jvm startup and slow GUI libraries compared to native ones.

                • wolf@lemmy.zip
                  link
                  fedilink
                  English
                  arrow-up
                  6
                  ·
                  1 year ago

                  Factual errors:

                  • Interpreters neither need nor usually have a compilation step
                  • Even processors are nowadays virtual machines, modern hardware only understands microcode AFAIK

                  Words which have a common understanding in the current compiler construction world, which you define in IMHO a non standard way

                  • Compiler is commonly used to refer to tools which translate higher level languages (e.g. Java, C, Python, JavaScript) to a machine representation (e.g. JVM, Arm64, x86_64, MIPS…)
                  • Even in academia Java is referred to as compiled/interpreted language (at the same time)

                  Factual errors about Java:

                  • We have ahead of time compilers for a very long time now (GraalVM etc)
                  • There are chips which implement the JVM in hardware
                • Phrodo_00@lemmy.world
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  arrow-down
                  1
                  ·
                  1 year ago

                  all interpreters have a compilation step that produces machine code

                  Very much not a thing. JIT interpreters are actually not that common. Most interpreters parse code to an AST in memory and then run execute said AST, without any compilation to machine code.

                  the output of the standard javac compiler is not machine code that a processor understands. This is what makes Java not a compiled language.

                  Listen to yourself the output of the compiler makes it not a compiled language. Java is a compiled language, and jvm bytecode can be compiled (see graalvm), or interpreted (and when interpreted it can be JITd)

                • Aceticon@lemmy.world
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  arrow-down
                  1
                  ·
                  edit-2
                  1 year ago

                  I think you’re used to modern interpreted languages and are unaware of how the runtimes of interpreted languages used to work.

                  Something like Basic (to use a properly old example) was constantly interpreting source code during the entire run.

                  If I’m not mistaken Python was the first major interpreted language which by default interpreted the code into a binary format and then just ran the binary (and, if I remember it correctly, that wasn’t the case in its first version). By this point Java already JIT compilation in its VM for a while.

                  I think you’re committing the error of comparing modern interpreted languages with how Java worked 2 decades ago.

            • Aceticon@lemmy.world
              link
              fedilink
              English
              arrow-up
              6
              ·
              1 year ago

              There is another compilation step inside the Java Virtual Machine which “compiles” the VM Assembly code to native code at runtime.

              This is what’s called JIT compilation and has been part of the standard Java Virtual Machine for about 2 decades and the default - at least server side - for almost as long (i.e. you have to explicitly pass a parameter to disable it at startup if you want the old runtime interpreted VM opcode behaviour).

              Source: I used to design and develop mission critical high performance distributed server systems in Java for banks since before 2008 and it definitelly is capable of handling it (the bottleneck tended to be the TB-size database, not the Java application).

          • Captain Aggravated@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            5
            arrow-down
            4
            ·
            1 year ago

            Eh…Java source code compiles into bytecode which runs in a virtual machine. Compare this to a language like C which compiles to native machine code. Java still gets interpreted.

              • 31337@sh.itjust.works
                link
                fedilink
                English
                arrow-up
                2
                ·
                1 year ago

                Yeah, in my personal experience (with numerical compute-heavy code), normal python code, ran in the normal python interpreter, is much slower than the equivalent normal Java code with the normal Java VM (like 50x). Then C/Fortran is ~2x faster than Java (with gcc + optimization flags).

                I think Java is a good middle-ground between coding speed and execution speed. Sadly, it seems to be dying. And JavaFX is shit for trying emulate full-stack web-dev. The fucking ancient Swing is even better.

                Scala and Kotlin are OK, but I think they are making the mistake of feature-creep that causes large projects with many people to contain multiple programming paradigms that only some of the team can grok well, instead of a restricted OOP Java codebase that encourages Gang of Four style code. Though, I guess GoF-style code resulted in that crazy complicated “enterprise” Java shit.

                • Aceticon@lemmy.world
                  link
                  fedilink
                  English
                  arrow-up
                  3
                  ·
                  edit-2
                  1 year ago

                  Last I checked Java was alive and well in the server-side for things like middleware and backend, especially because the whole development ecosystem is incredibly mature and significantly more stable and well integrated with corporate-category systems than pretty much anything else (good luck managing a single reliable transaction across, say, 2 different databases in 2 different sites and 1 MQ system with Python).

                  Absolutelly, it’s been mostly limping in a half-dead state on the UI ever since day 1 and even Google using it with Android didn’t exactly help (because Google’s architectural design of the entire Android framework is, well, shit, and has become worse over time).

                  It also lost it’s proeminence in dynamic web page generation at around the early 00s to actual templating languages (such as PHP) with a much lower learning curve and later to Python.

                  The ecosystem for Java is rock-solid and in widespread use in corporate multi-tier architectures that require reliable operation (were, for example, it’s native multi-threading synchronisation support and core libraries make a huge difference) and integration with professional backend systems, but for the rest, not so much (I did both that stuff and Android, and the latter is like the amateur-hour of Java ecosystems in comparison with the former).

            • qaz@lemmy.world
              link
              fedilink
              English
              arrow-up
              5
              arrow-down
              2
              ·
              1 year ago

              The bytecode is turned into native code before execution

              • Aatube@kbin.socialOP
                link
                fedilink
                arrow-up
                1
                arrow-down
                2
                ·
                edit-2
                1 year ago

                That’s not how it works. If that really was how it worked there’d be no point even having bytecode; you’d just straight up get the native code. Unless you’re talking about JIT, but your wording seems to be implying that all the bytecode turns into native code at once.

                • qaz@lemmy.world
                  link
                  fedilink
                  English
                  arrow-up
                  4
                  ·
                  edit-2
                  1 year ago

                  I was referring to JIT but there are also other options like GraalVM for AOT compilation.