VitorHugoAntunes / Algorithm_Execution_Time

Comparison of different algorithms with different data sources (numbers and words) using C++ and Typescript for execution speed testing.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Performance of algorithms

Runtime comparison of Bubble Sort and Selection Sort algorithm using JavaScript and C++ languages.

Installation

  git clone https://github.com/VitorHugoAntunes/Algorithm_Execution_Time.git

  cd project

  npm install OR yarn

Requirements to run

What you need to run the tests:

  • Javascript:

    NodeJS and run code

  • C++:

    Have a C++ compiler on your machine: GCC, MinGW, MSVC, Intel C++, Clang LLVM, etc.

    Download the <nlohmann/json.hpp> library using VCPKG and add it to your C++ compiler folder. Instructions in this link.

    run code

Test structures

Run tests with different data structures:

  • Typescript:

Switch between JSON files from the DATA folder or change the size of the LIST variable with random numbers.

  • C++:

Change the typing of the parameters of the BUBBLE SORT or SELECTION SORT algorithms to string or double_t (whichever you want) and choose the JSON file or the array of numbers in the function call.

About

Comparison of different algorithms with different data sources (numbers and words) using C++ and Typescript for execution speed testing.


Languages

Language:C++ 72.6%Language:TypeScript 27.4%