On 9/07/2022 1:10 am, Colin Paice wrote:
I was told
If it executes

    1. a million times a second - write in assembler
    2. a thousand times a second write it in cobol or C
    3. once a second - write it in Java
    4. Else /bash/rexx/
Probably not an accurate picture these days.

It would have to be a very select piece of assembler to have any significant advantage over C / C++. C and C++ have the advantage that the compiler doesn't have to produce maintainable or comprehensible code, so it can do lots of optimizations, inlining, loop unrolling etc. - whatever the compiler writers found produces the fastest code. Of course you can do the same in assembler - it is just a question of whether it is practicable for larger pieces of code.

Java: that is probably reasonable if you are talking about starting a JVM from scratch every time e.g. like a z/OS batch job. If you are talking about a routine executed by a running program, I would expect Java to be close to C. (Certainly not 3 orders of magnitude different.)

--
Andrew Rowley
Black Hill Software

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to