Skip to content

Benchmarks: add EdDSA algorithm#1063

Merged
lcobucci merged 1 commit into
lcobucci:5.4.xfrom
Slamdunk:bench_eddsa
May 20, 2024
Merged

Benchmarks: add EdDSA algorithm#1063
lcobucci merged 1 commit into
lcobucci:5.4.xfrom
Slamdunk:bench_eddsa

Conversation

@Slamdunk

@Slamdunk Slamdunk commented May 17, 2024

Copy link
Copy Markdown
Collaborator

Apparently we've always missed to add EdDSA algorithm to the benchmarks.

Original PR: #605

Note on commit signing: so far commit signing has always been a source of hassles with zero benefits for me.
I'm dropping the practice and I won't sign commits anymore.

@Slamdunk Slamdunk added this to the 5.4.0 milestone May 17, 2024
@Slamdunk

Copy link
Copy Markdown
Collaborator Author

Result difference (GHA link):

 PHPBench (1.2.15) running benchmarks... #standwithukraine
 with configuration file: /src/phpbench.json
 with PHP version 8.3.7, xdebug ❌, opcache ❌

 ............................................

 Subjects: 20, Assertions: 0, Failures: 0, Errors: 0
 +----------------------+---------+---------+------+-----+----------+-----------+--------+
 | benchmark            | subject | set     | revs | its | mem_peak | mode      | rstdev |
 +----------------------+---------+---------+------+-----+----------+-----------+--------+
 | ParseTokenBench      | hmac    | HS256   | 100  | 5   | 4.559mb  | 13.028μs  | ±0.57% |
 | ParseTokenBench      | hmac    | HS384   | 100  | 5   | 4.559mb  | 13.032μs  | ±2.25% |
 | ParseTokenBench      | hmac    | HS512   | 100  | 5   | 4.559mb  | 13.020μs  | ±0.76% |
 | ParseTokenBench      | rsa     | RS256   | 100  | 5   | 4.559mb  | 375.433μs | ±1.35% |
 | ParseTokenBench      | rsa     | RS384   | 100  | 5   | 4.559mb  | 372.946μs | ±0.38% |
 | ParseTokenBench      | rsa     | RS512   | 100  | 5   | 4.559mb  | 378.916μs | ±1.45% |
 | ParseTokenBench      | ecdsa   | ES256   | 100  | 5   | 4.559mb  | 415.955μs | ±1.27% |
 | ParseTokenBench      | ecdsa   | ES384   | 100  | 5   | 4.559mb  | 918.062μs | ±1.25% |
 | ParseTokenBench      | ecdsa   | ES512   | 100  | 5   | 4.559mb  | 820.355μs | ±1.00% |
+| ParseTokenBench      | eddsa   | EdDSA   | 100  | 5   | 4.559mb  | 53.697μs  | ±0.33% |
 | ParseTokenBench      | blake2b | BLAKE2B | 100  | 5   | 4.559mb  | 11.837μs  | ±1.18% |
 | IssueTokenBench      | hmac    | HS256   | 100  | 5   | 4.559mb  | 7.342μs   | ±0.75% |
 | IssueTokenBench      | hmac    | HS384   | 100  | 5   | 4.559mb  | 7.526μs   | ±0.77% |
 | IssueTokenBench      | hmac    | HS512   | 100  | 5   | 4.559mb  | 7.594μs   | ±0.64% |
 | IssueTokenBench      | rsa     | RS256   | 100  | 5   | 4.559mb  | 1.165ms   | ±2.06% |
 | IssueTokenBench      | rsa     | RS384   | 100  | 5   | 4.559mb  | 1.175ms   | ±0.62% |
 | IssueTokenBench      | rsa     | RS512   | 100  | 5   | 4.559mb  | 1.198ms   | ±0.95% |
 | IssueTokenBench      | ecdsa   | ES256   | 100  | 5   | 4.559mb  | 426.960μs | ±2.36% |
 | IssueTokenBench      | ecdsa   | ES384   | 100  | 5   | 4.559mb  | 1.083ms   | ±3.17% |
 | IssueTokenBench      | ecdsa   | ES512   | 100  | 5   | 4.559mb  | 649.759μs | ±1.92% |
+| IssueTokenBench      | eddsa   | EdDSA   | 100  | 5   | 4.559mb  | 23.383μs  | ±1.64% |
 | IssueTokenBench      | blake2b | BLAKE2B | 100  | 5   | 4.559mb  | 6.136μs   | ±0.79% |
 | CreateSignatureBench | hmac    | HS256   | 100  | 5   | 4.559mb  | 1.380μs   | ±0.36% |
 | CreateSignatureBench | hmac    | HS384   | 100  | 5   | 4.559mb  | 1.590μs   | ±0.00% |
 | CreateSignatureBench | hmac    | HS512   | 100  | 5   | 4.559mb  | 1.590μs   | ±0.00% |
 | CreateSignatureBench | rsa     | RS256   | 100  | 5   | 4.559mb  | 1.140ms   | ±1.27% |
 | CreateSignatureBench | rsa     | RS384   | 100  | 5   | 4.559mb  | 1.135ms   | ±0.81% |
 | CreateSignatureBench | rsa     | RS512   | 100  | 5   | 4.559mb  | 1.143ms   | ±1.31% |
 | CreateSignatureBench | ecdsa   | ES256   | 100  | 5   | 4.559mb  | 378.836μs | ±1.26% |
 | CreateSignatureBench | ecdsa   | ES384   | 100  | 5   | 4.559mb  | 1.026ms   | ±1.87% |
 | CreateSignatureBench | ecdsa   | ES512   | 100  | 5   | 4.559mb  | 618.989μs | ±0.85% |
+| CreateSignatureBench | eddsa   | EdDSA   | 100  | 5   | 4.559mb  | 16.909μs  | ±0.45% |
 | CreateSignatureBench | blake2b | BLAKE2B | 100  | 5   | 4.559mb  | 0.490μs   | ±1.29% |
 | VerifySignatureBench | hmac    | HS256   | 100  | 5   | 4.559mb  | 1.461μs   | ±2.36% |
 | VerifySignatureBench | hmac    | HS384   | 100  | 5   | 4.559mb  | 1.689μs   | ±0.58% |
 | VerifySignatureBench | hmac    | HS512   | 100  | 5   | 4.559mb  | 1.690μs   | ±0.24% |
 | VerifySignatureBench | rsa     | RS256   | 100  | 5   | 4.559mb  | 343.735μs | ±0.99% |
 | VerifySignatureBench | rsa     | RS384   | 100  | 5   | 4.559mb  | 337.335μs | ±1.36% |
 | VerifySignatureBench | rsa     | RS512   | 100  | 5   | 4.559mb  | 340.165μs | ±1.10% |
 | VerifySignatureBench | ecdsa   | ES256   | 100  | 5   | 4.559mb  | 389.799μs | ±0.89% |
 | VerifySignatureBench | ecdsa   | ES384   | 100  | 5   | 4.559mb  | 889.068μs | ±0.61% |
 | VerifySignatureBench | ecdsa   | ES512   | 100  | 5   | 4.559mb  | 788.973μs | ±1.11% |
+| VerifySignatureBench | eddsa   | EdDSA   | 100  | 5   | 4.559mb  | 40.982μs  | ±1.04% |
 | VerifySignatureBench | blake2b | BLAKE2B | 100  | 5   | 4.559mb  | 0.560μs   | ±0.71% |
 +----------------------+---------+---------+------+-----+----------+-----------+--------+

@Ocramius Ocramius left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From this, I can see that BLAKE2b is amazing 🤣

@lcobucci
lcobucci merged commit f7b7fb9 into lcobucci:5.4.x May 20, 2024
@Slamdunk
Slamdunk deleted the bench_eddsa branch May 20, 2024 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants