NOTE : Combinations of optimizations do not work currently due to implementation issues.
The optimizations are governed by Jon Bentley's rules for optimizing work.
Find the link to a pdf explaining the rules here
- Function Inlining
- Loop Unrolling
- Combining Tests(If-Else to Switch)
- Compile Time Initialization
- Tail End Recursion Elimination
- Loop Jamming
- can be accessed through CLI or GUI
- The CLI is installed directly on the host.
- GUI is run in a docker container.
Is a software tool with a command line interface
- Python3.6+
- linux
- flask
- indent
- tqdm
- fire
- ply
- uuid
- emoji
- sympy
- Clone the repository
- Run the install script (install.sh)
- Add this to your shell config file :
export PATH=$PATH":<enter-path-to-directory>/env
- Add this to your shell config file :
export COPTIMIZER_PATH="<enter-path-to-directory>"
To verify installation :
Coptimizer help
The output should look like this:
Welcome to the command line Coptimizer....🔥
Usage sf ➡️ Coptimizer sf [FLAGS]
Usage ox ➡️ Coptimizer ox [PATH]
sf [options] ➡️ setflags in from this pool [UNROLL,COMPILE_INIT,INLINE,IF_TO_SWITCH,TAIL_RECURSION,JAMMING]
ox [PATH] ➡️ optimize file in given path and create output.c file in same path
provides general information about the interface
Coptimizer help
Set flags for selected optimization found here Used to select which optimizations are applied on the next run.
Coptimizer sf <flags list>
Use help to see flags options
Optimizes input source code. Outputs processed source code to stdout and stores it in output.c
Coptimizer ox <path to file>
Instructions to run the server and access the GUI.
- while in the main directory
docker build -t coptimizer-server:1.0 .
docker run -p 5000:5000 coptimizer-server:1.0
- can be accessed at http://localhost:5000/
cout << "Yet to Host! \n";
Find the link for the demonstration here