mirror of
https://github.com/data61/MP-SPDZ.git
synced 2026-01-09 13:37:58 -05:00
Update PQ benchmark with entry size settings
This commit is contained in:
@@ -7,6 +7,7 @@ from Compiler.path_oblivious_heap import (
|
||||
path_oblivious_sort,
|
||||
)
|
||||
from Compiler.types import Array, sint
|
||||
from Compiler.util import log2
|
||||
|
||||
DEBUG = True
|
||||
|
||||
@@ -30,11 +31,15 @@ SORTING = False
|
||||
INSERT = INSERT or EXTRACT # Always insert if we are going to extract
|
||||
|
||||
# Benchmark parameters
|
||||
## General
|
||||
KEY_SIZE = lambda n: log2(n)
|
||||
VALUE_SIZE = lambda n: 64
|
||||
|
||||
## Insert / ExtractMin
|
||||
RANGE = [2**i for i in range(1, 10)]
|
||||
OPERATIONS_PER_STEP = 3
|
||||
RANGE = [2**i for i in range(1, 5)]
|
||||
OPERATIONS_PER_STEP = 2
|
||||
TIME_INIT = True
|
||||
TREE_HEAP = True
|
||||
TREE_HEAP = False
|
||||
TREE_PATH_HEAP = True
|
||||
LINEAR_HEAP = True
|
||||
OPTIMAL_TREE_HEAP = False
|
||||
@@ -93,8 +98,10 @@ if INSERT:
|
||||
if EXTRACT:
|
||||
operation_round(q, apply_extract, capacity, tag=tag + " extract_min")
|
||||
|
||||
|
||||
dprint(f"\n\nBENCHMARKING INSERT {'AND EXTRACT ' if EXTRACT else ''}TIME")
|
||||
for capacity in RANGE:
|
||||
entry_size=(KEY_SIZE(capacity), VALUE_SIZE(capacity))
|
||||
|
||||
dprint(f"\nCAPACITY {capacity}")
|
||||
|
||||
@@ -104,6 +111,7 @@ if INSERT:
|
||||
HeapQ,
|
||||
capacity,
|
||||
oram_type=oram.RecursiveORAM,
|
||||
entry_size=entry_size,
|
||||
tag="ORAM Heap (Tree)",
|
||||
)
|
||||
|
||||
@@ -113,6 +121,7 @@ if INSERT:
|
||||
HeapQ,
|
||||
capacity,
|
||||
oram_type=path_oram.RecursivePathORAM,
|
||||
entry_size=entry_size,
|
||||
tag="ORAM Heap (Path)",
|
||||
)
|
||||
|
||||
@@ -122,6 +131,7 @@ if INSERT:
|
||||
HeapQ,
|
||||
capacity,
|
||||
oram_type=oram.LinearORAM,
|
||||
entry_size=entry_size,
|
||||
tag="ORAM Heap (Linear)",
|
||||
)
|
||||
|
||||
@@ -131,6 +141,7 @@ if INSERT:
|
||||
HeapQ,
|
||||
capacity,
|
||||
oram_type=oram.OptimalORAM,
|
||||
entry_size=entry_size,
|
||||
tag="ORAM Heap (Optimal Tree)",
|
||||
)
|
||||
|
||||
@@ -140,6 +151,7 @@ if INSERT:
|
||||
HeapQ,
|
||||
capacity,
|
||||
oram_type=path_oram.OptimalORAM,
|
||||
entry_size=entry_size,
|
||||
tag="ORAM Heap (Optimal Path)",
|
||||
)
|
||||
|
||||
@@ -150,6 +162,7 @@ if INSERT:
|
||||
capacity,
|
||||
bucket_size=2,
|
||||
variant=POHVariant.PATH,
|
||||
entry_size=entry_size,
|
||||
tag="POH (Path)",
|
||||
)
|
||||
|
||||
@@ -161,6 +174,7 @@ if INSERT:
|
||||
bucket_size=2,
|
||||
stash_size=20, # based on empirical analysis by Keller and Scholl
|
||||
variant=POHVariant.PATH,
|
||||
entry_size=entry_size,
|
||||
tag="POH (Path (constant stash size))",
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user