155k views
5 votes
Why does the power needed for a traditional COBOL application not have a linear relationship with the power needed for a new Java application?

1 Answer

4 votes

There is no reference to which benchmark is used as the basis for a statement made in the question.

In addition, you do not identify which version of COBOL is being compared to which version of Java. Data memory management is different between Java and COBOL.

The 70s mainframe version of COBOL had static memory allocation and no runtime stack. (The new versions of COBOL have "Automatic Variables" allocated in a stack.) Java has garbage collection and a stack for recursion refills. Both features have a CPU cycle cost in support.

Object-COBOL must have dynamic memory, just as Java must have objects and their class information data structure. The data types are very different from COBOL and Java. COBOL supports arithmetic in numeric character fields. Any conversion of characters to binary and vice versa depends on the implementation and is hidden from the programmer. Programmers can specify that a field must be local in binary. The IBM version of COBOL supports the “compressed decimal” data format that is implemented in hardware on 360, 370 and z machines. Compilers compatible with an IBM need to handle this type of data without software.

User KingErroneous
by
5.0k points