MatheusRich / functional-vs-imperative-data-structures-and-algorithms

Comparison between functional and imperative implementations of basic data structures and algorithms.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Data Structures and Algorithms: Comparison between Functional and Imperative Approaches

Benchmarks between functional and imperative implementations of basic data structures and algorithms.

Tools

Elm

Version: 0.19.1

Node Version: v13.14.0

Compile command: elm make --optimize input.elm output.js

Formatter: Elm-format

Benchmark: Elm-explorations' Benchmark

Typescript

Version: 4.2.3

Node Version: v13.14.0

Compile command: tsc input.ts

Formatter: Prettier

Benchmark: Benny

Haskell

Version: The Glorious Glasgow Haskell Compilation System, version 8.0.2

Compile command: ghc -O2 input.hs

Formatter: Brittany

Benchmark: Criterion

C++

Version: g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0

Compile command: g++ -std=c++11 -O3 input.cpp

Formatter: VsCode's formatter with Google config

Benchmark: Google's Benchmark

About

Comparison between functional and imperative implementations of basic data structures and algorithms.


Languages

Language:Elm 29.4%Language:C++ 20.1%Language:Haskell 19.8%Language:TypeScript 19.3%Language:Ruby 9.6%Language:Shell 1.4%Language:JavaScript 0.4%