forked from nucypher/ferveo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c0c2c9e
commit 0091ae1
Showing
24 changed files
with
1,244 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
target | ||
*.wasm | ||
tpke-python/py-benches/inputs/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ members = [ | |
"subproductdomain", | ||
"tpke", | ||
"tpke-wasm", | ||
"tpke-python", | ||
] | ||
|
||
[profile.bench] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
__pycache__ | ||
*.egg-info | ||
*.so | ||
build/ | ||
dist/ | ||
docs/_build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Benchmarks | ||
|
||
## Hardware | ||
|
||
Benchmarks produced on: | ||
|
||
- Intel® Core™ i7-10875H CPU @ 2.30GHz × 16 (single-threaded), | ||
- Version 107.0.5304.110 (Official Build) (64-bit), | ||
- Pop!\_OS 22.04 LTS (64-bit), | ||
|
||
### Setup | ||
|
||
First, build the WASM target and make inputs for Python benchmarks: | ||
|
||
```bash | ||
cd tpke-wasm | ||
wasm-pack build --release --target nodejs # Notice the target | ||
node scripts/make-python-bench-inputs.js | ||
``` | ||
|
||
Then, build and install the Python package: | ||
|
||
```bash | ||
cd tpke-python | ||
pip install -e . | ||
``` | ||
|
||
### Running | ||
|
||
```bash | ||
cd tpke-python | ||
python py-benches/benchmark.py | ||
|
||
``` | ||
|
||
## Results | ||
|
||
Using fixed values, such that `shares=num_entities=threshold`. | ||
|
||
Rounding to nearest ms. | ||
|
||
### Python Results | ||
|
||
Filename refers to the number of shares. | ||
|
||
``` | ||
participant-payloads-8.json: 2 ms | ||
participant-payloads-16.json: 3 ms | ||
participant-payloads-32.json: 6 ms | ||
participant-payloads-64.json: 12 ms | ||
participant-payloads-128.json: 25 ms | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[package] | ||
name = "tpke-python" | ||
authors = ["Piotr Roslaniec <[email protected]>"] | ||
version = "0.1.0" | ||
edition = "2018" | ||
|
||
[lib] | ||
crate-type = ["cdylib"] | ||
|
||
[dependencies] | ||
pyo3 = "0.16" | ||
group-threshold-cryptography = { path = "../tpke"} | ||
|
||
[build-dependencies] | ||
pyo3-build-config = "*" |
Oops, something went wrong.