Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Komodo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
STEVAN Antoine
Komodo
Commits
37a2a7e2
Verified
Commit
37a2a7e2
authored
1 year ago
by
STEVAN Antoine
Browse files
Options
Downloads
Patches
Plain Diff
don't try to compress with validation
that's useless. the commit also modifies the plot script accordingly.
parent
f7ce05c3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
benches/plot.py
+2
-4
2 additions, 4 deletions
benches/plot.py
examples/bench_setup_size.rs
+3
-12
3 additions, 12 deletions
examples/bench_setup_size.rs
with
5 additions
and
16 deletions
benches/plot.py
+
2
−
4
View file @
37a2a7e2
...
@@ -142,10 +142,8 @@ def plot_setup(data: Data, save: bool = False):
...
@@ -142,10 +142,8 @@ def plot_setup(data: Data, save: bool = False):
axs
[
2
].
legend
()
axs
[
2
].
legend
()
axs
[
2
].
grid
()
axs
[
2
].
grid
()
plot
(
data
,
"
serialized size with no compression and no validation
"
,
"
uncompressed unvalidated
"
,
"
red
"
,
False
,
axs
[
3
])
plot
(
data
,
"
serialized size with no compression
"
,
"
uncompressed
"
,
"
orange
"
,
False
,
axs
[
3
])
plot
(
data
,
"
serialized size with compression and no validation
"
,
"
compressed unvalidated
"
,
"
orange
"
,
False
,
axs
[
3
])
plot
(
data
,
"
serialized size with compression
"
,
"
compressed
"
,
"
blue
"
,
False
,
axs
[
3
])
plot
(
data
,
"
serialized size with no compression and validation
"
,
"
uncompressed validated
"
,
"
blue
"
,
False
,
axs
[
3
])
plot
(
data
,
"
serialized size with compression and validation
"
,
"
compressed validated
"
,
"
green
"
,
False
,
axs
[
3
])
axs
[
3
].
set_title
(
"
size
"
)
axs
[
3
].
set_title
(
"
size
"
)
axs
[
3
].
set_xlabel
(
"
degree
"
)
axs
[
3
].
set_xlabel
(
"
degree
"
)
axs
[
3
].
set_ylabel
(
"
size (in kb)
"
)
axs
[
3
].
set_ylabel
(
"
size (in kb)
"
)
...
...
This diff is collapsed.
Click to expand it.
examples/bench_setup_size.rs
+
3
−
12
View file @
37a2a7e2
...
@@ -2,7 +2,7 @@ use ark_bls12_381::{Fr, G1Projective};
...
@@ -2,7 +2,7 @@ use ark_bls12_381::{Fr, G1Projective};
use
ark_ec
::
CurveGroup
;
use
ark_ec
::
CurveGroup
;
use
ark_ff
::
PrimeField
;
use
ark_ff
::
PrimeField
;
use
ark_poly
::{
univariate
::
DensePolynomial
,
DenseUVPolynomial
};
use
ark_poly
::{
univariate
::
DensePolynomial
,
DenseUVPolynomial
};
use
ark_serialize
::{
CanonicalSerialize
,
Compress
,
Validate
};
use
ark_serialize
::{
CanonicalSerialize
,
Compress
};
use
ark_std
::
ops
::
Div
;
use
ark_std
::
ops
::
Div
;
use
komodo
::
zk
;
use
komodo
::
zk
;
...
@@ -20,22 +20,13 @@ where
...
@@ -20,22 +20,13 @@ where
let
setup
=
zk
::
setup
::
<
_
,
F
,
G
>
(
degree
,
rng
)
.unwrap
();
let
setup
=
zk
::
setup
::
<
_
,
F
,
G
>
(
degree
,
rng
)
.unwrap
();
for
(
compress
,
validate
)
in
[
for
compress
in
[
Compress
::
Yes
,
Compress
::
No
]
{
(
Compress
::
Yes
,
Validate
::
Yes
),
(
Compress
::
Yes
,
Validate
::
No
),
(
Compress
::
No
,
Validate
::
Yes
),
(
Compress
::
No
,
Validate
::
No
),
]
{
println!
(
println!
(
r#"{{"reason": "benchmark-complete", "id": "serialized size with {}
and {}
{} on {}", "mean": {}}}"#
,
r#"{{"reason": "benchmark-complete", "id": "serialized size with {} {} on {}", "mean": {}}}"#
,
match
compress
{
match
compress
{
Compress
::
Yes
=>
"compression"
,
Compress
::
Yes
=>
"compression"
,
Compress
::
No
=>
"no compression"
,
Compress
::
No
=>
"no compression"
,
},
},
match
validate
{
Validate
::
Yes
=>
"validation"
,
Validate
::
No
=>
"no validation"
,
},
degree
,
degree
,
std
::
any
::
type_name
::
<
F
>
(),
std
::
any
::
type_name
::
<
F
>
(),
setup
.serialized_size
(
compress
),
setup
.serialized_size
(
compress
),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment