Closed Issues
pull requests
closed pull requests
MIT License

Runtime analysis of code with plotting

A quick comparison among Python, Cython, and the C languages

A Programming Assignment regarding the Programming Language Design course.

(Fall 2021)

Table of Contents
  1. About The Project

  2. Getting Started

  3. Usage
  4. How it Works
  5. Testing and Screenshots
  6. License

About The Project

In this project, we are comparing the execution time of four different approaches, including :

  • Pure C
  • Optimized Cython
  • Non-Optimized Cython
  • Pure Python

Built With

Getting Started


  • Python 3, An IDE
  • C compiler (gcc, …)
  • Cython lib
  • matplotlib


  • Clone the repo
  git clone
  • Install requirement :

pip install cython
pip install matplotlib


Cython enables you to create extension modules from Python, Cython, or C code to a compiled version of it, which is much faster compared to just using python.

Numpy, for example, uses this method

How it Works

we have implemented bubble sort in 4 diffrent methods :

  1. C
  2. An optimized Cython
  3. Non optimized Cython
  4. Python

to import first three methods you must build them using its setup file in its folder

Testing and Screenshots



Distributed under the MIT License. See LICENSE for more information.

Author Info:

First and Last Name Student Number Username
Mohammad Hossein(Cena) Ashoori 97149068 Link
Mohammad Mehdi Afkhami 97149008 Link
Parsa KamaliPour 97149081 Link


View Github