Skip to content

Repository files navigation

priority-queue-benchmark

Creating benchmark cases to quantify the performance of different implementations of priority queues

Setup

  • export BOOST_PATH={PATH_TO_BOOST_LIB}
  • install pandas and pytest in Python
  • GCC compiler

Test Run

pytest testrun.py::test_single -s running single trial test
pytest testrun.py::test_simple_I -s running simple cases in TEST I
pytest testrun.py::test_simple_II -s running simple cases in TEST II
pytest testrun.py::test_I -s slower, running all cases in TEST I
pytest testrun.py::test_II -s slower, running all cases in TEST II
pytest testrun.py::test_all -s slower, running all cases available

test result csv is generated to the results folder

TEST Candidates

A) std::priority_queue

B) boost::pairing_heap

C) pairing_heap_priqueue

D) skiplist_priqueue

TEST I: add random elements one by one

TESTID:

i) 1k elements

ii) 10k elements

iii) 100k elements

iv) 1M elements

v) 10M elements

vi) 100M elements

TEST II: find the shortest path in graph

TESTID:

i) 1k elements

ii) 10k elements

iii) 100k elements

iv) 1M elements

v) 10M elements

vi) 100M elements

TEST Results

hardware: 16 x 11th Gen Intel(R) Core(TM) i7-11700F @ 2.50GHz CPU Cores

test_I_result.csv

candtypeidsizeelapsed_time_uselapsed_time_mselapsed_time_s
AIi1000550.0550.0001
AIii1000023622.3620.0024
AIiii1000001276512.7650.0128
AIiv1000000118329118.3290.1183
AIv1000000018306641830.6641.8307
AIvi1000000002698049426980.49426.9805
BIi10001670.1670.0002
BIii1000024912.4910.0025
BIiii1000003249132.4910.0325
BIiv100000010922961092.2961.0923
BIv100000002537949725379.49725.3795
BIvi100000000563079244563079.244563.0792
CIi1000920.0920.0001
CIii1000013041.3040.0013
CIiii1000001783217.8320.0178
CIiv1000000958796958.7960.9588
CIv100000001954405619544.05619.5441
CIvi100000000367442111367442.111367.4421
DIi10001630.1630.0002
DIii1000055465.5460.0055
DIiii1000004996649.9660.05
DIiv100000014865401486.541.4865
DIv100000002954547129545.47129.5455
DIvi100000000695342947695342.947695.3429

test_II_result.csv

candtypeidsizeelapsed_time_uselapsed_time_mselapsed_time_s
AIIi100038153.8150.0038
AIIii100002162621.6260.0216
AIIiii100000648841648.8410.6488
AIIiv10000001144060111440.60111.4406
AIIv10000000197466643197466.643197.4666
BIIi100015481.5480.0015
BIIii100004134941.3490.0413
BIIiii100000636757636.7570.6368
BIIiv10000001147647911476.47911.4765
BIIv10000000217450688217450.688217.4507
CIIi100030413.0410.003
CIIii100002824628.2460.0282
CIIiii100000696461696.4610.6965
CIIiv10000001093913910939.13910.9391
CIIv10000000206034888206034.888206.0349
DIIi100054455.4450.0054
DIIii100002325223.2520.0233
DIIiii100000663265663.2650.6633
DIIiv10000001213864912138.64912.1386
DIIv10000000233552213233552.213233.5522

About

running benchmark cases to quantify the performance of different implementations of priority queues

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages