Highest Rated Comments


OneWingedShark3 karma

The optimizer works best with a "structured program."

I assume that's what the control-flow graph is supposed to detect, yes?

The problem with something like PERFORM (even when used sensibly) is that it creates a control flow graph (CFG) that appears to have a lot of loops.

What about PERFORM makes it screw up the CFG?

COBOL (along with PL/I) is (are) the really big users of packed decimal. So, unlike most standard optimizers, we make sure that packed decimal is a first class type.

Is packed-decimal the same as Binary Coded Decimal (BCD)? -- I seem to recall reading that they were, but I'm not entirely sure.

I guess the question was "what is the one most challenging..." I think that the one would be large control flow graphs with not nice structure.

Is this because optimizing w/ control-graphs of "not-nice structure" prevents applying a lot of optimizations? Or is it just the complexity and size of the structures? Or both?

OneWingedShark2 karma

I have several questions:

  1. What portions of the OS were written in PL/X?
  2. What portions were in C/C++?
  3. WRT the C/C++ portions, were there any difficulties that would have been better handled by something like Ada? (Or did PL/X adequately cover those areas?)
  4. /u/ahk99: what's the most challenging problem you tackled in optimizing COBOL?

OneWingedShark2 karma

Thank you for the info.

OneWingedShark2 karma

Thank you for the explanation.