HOME  NEWS  FORUM  DOWNLOAD  LINK
OpenCOBOL - an open-source COBOL compiler
Main Menu
Download
Documentation
Development
Who's Online
12 user(s) are online (3 user(s) are browsing Wiki)

Members: 0
Guests: 12

more...
Powered by
SourceForge

Xoops

Creative Commons



Optimize

Optimize Options

There are two compiler options for optimizations: -O and -O2. These options enable compilation (C to assembly) levels.

The option -O or -O2 is passed to the C compiler as is and used for C level optimization.

Optimize Call

When a CALL statement is executed, the called program is linked at run time. By specifying the compiler option -fstatic-call, you can statically link the program at compile time and call it efficiently. (see Static Linking)

Optimize Binary

By default, data items of usage BINARY or COMP are stored in big-endian form. On those machines whose native byte order is little-endian, this is not efficient. Consider changing PIC to COMP-5 or to the 2002 standard USAGE BINARY-xxx, whereby xxx is CHAR for 1 byte, SHORT for 2 bytes, LONG for 4 bytes and DOUBLE (sic) for 8 bytes.

In addition, setting the option binary-size to 2-4-8 or 1-2-4-8 is more efficient than others.



Front page   Edit Freeze Diff Backup Upload Copy Rename Reload   New List of pages Search Recent changes   Help   RSS of recent changes
Counter: 15526, today: 1, yesterday: 6
Last-modified: Tue, 15 Jan 2008 05:31:38 GMT (1954d)
Copyright (C) 2005 The OpenCOBOL Project. All rights reserved.
Powered by Xoops2 | PHP | MySQL | Apache
ocean-net