luckyq / packed-memory-array

A simple implementation of the packed memory array

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Benchmarks

Implementation-1

Time to insert 107 elements: 0m30.180s*

Implementation-2

Time to insert 107 elements: 0m25.048s*

* (When compiled with -O2 using g++, on a 2.3 GHz Intel Core i7 machine with 8G RAM)

Analysis

  • Complexity of an insert: O(log2n) (amortized)

  • Complexity of find (binary search): O(log2n) (worst-case)

About

A simple implementation of the packed memory array


Languages

Language:C++ 91.1%Language:Shell 7.4%Language:Makefile 1.0%Language:Gnuplot 0.4%