diff --git a/README.md b/README.md index 961e7b0..04b2e45 100644 --- a/README.md +++ b/README.md @@ -96,14 +96,15 @@ For usage instructions, run the following command (assuming the `pivot` executab ## Benchmarks A simple [benchmark script](./scripts/benchmark.py) in Python (requires matplotlib) is included. -Semi-log plots of running times per pivot attempt (after a warm up period) in dimensions 2 and 3 are provided below. +Semi-log plots of running times per pivot attempt (after a warm up period) in dimensions 2 and 3 are provided below +for both fast and slow versions of the (tree-based) algorithm. Both plots reflect the results of benchmarking on an Apple Silicon M1 Pro CPU. Random seed 42 was used. | | | |-|-| |![](assets/bench_d2.png)|![](assets/bench_d3.png)| -The raw data for these plots can be found in [times2.json](bench/times2.json) and [times3.json](bench/times3.json). +The raw data for these plots can be found in the `bench/` directory (file names `times_{2,3}_{fast,slow}.json`). ## Examples diff --git a/assets/bench_d2.png b/assets/bench_d2.png index 865d94c..71ae354 100644 Binary files a/assets/bench_d2.png and b/assets/bench_d2.png differ diff --git a/assets/bench_d3.png b/assets/bench_d3.png index 00f84c1..c410f88 100644 Binary files a/assets/bench_d3.png and b/assets/bench_d3.png differ diff --git a/bench/times2.json b/bench/times2_fast.json similarity index 100% rename from bench/times2.json rename to bench/times2_fast.json diff --git a/bench/times2_slow.json b/bench/times2_slow.json new file mode 100644 index 0000000..911952b --- /dev/null +++ b/bench/times2_slow.json @@ -0,0 +1 @@ +{"3": 0.09710431098937988, "7": 0.15507888793945312, "15": 0.21952509880065918, "31": 0.30136609077453613, "63": 0.39467597007751465, "127": 0.5078966617584229, "255": 0.6015567779541016, "511": 0.7073962688446045, "1023": 0.8152859210968018, "2047": 0.9249351024627686, "4095": 1.0381338596343994, "8191": 1.1539809703826904, "16383": 1.2695138454437256, "32767": 1.3955068588256836, "65535": 1.5154569149017334, "131071": 1.6605849266052246, "262143": 1.8633058071136475, "524287": 2.1362268924713135} \ No newline at end of file diff --git a/bench/times3.json b/bench/times3_fast.json similarity index 100% rename from bench/times3.json rename to bench/times3_fast.json diff --git a/bench/times3_slow.json b/bench/times3_slow.json new file mode 100644 index 0000000..6110971 --- /dev/null +++ b/bench/times3_slow.json @@ -0,0 +1 @@ +{"3": 0.15212392807006836, "7": 0.23937487602233887, "15": 0.3380300998687744, "31": 0.46407008171081543, "63": 0.6050999164581299, "127": 0.7739088535308838, "255": 0.9613292217254639, "511": 1.1627249717712402, "1023": 1.380505084991455, "2047": 1.6292660236358643, "4095": 1.902130126953125, "8191": 2.2036406993865967, "16383": 2.5126559734344482, "32767": 2.8199679851531982, "65535": 3.152952194213867, "131071": 3.5156118869781494, "262143": 4.053955078125, "524287": 4.958038091659546} \ No newline at end of file