Skip to content
This repository has been archived by the owner on Mar 18, 2022. It is now read-only.

Add performance tests #45

Merged
merged 1 commit into from
May 4, 2021
Merged

Add performance tests #45

merged 1 commit into from
May 4, 2021

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Feb 25, 2021

This statistic shows that the hash of go is ~6x faster than as

# minTime(ms) maxTime(ms) average(ms)
go 11 108 14
as 61 480 82

This link https://gist.github.com/scoroberts/a60d61a2cc3afba1e8813b338ecd1501 shows that the current as implementation is comparable to java's (added a test for that).

@CLAassistant
Copy link

CLAassistant commented Feb 25, 2021

CLA assistant check
All committers have signed the CLA.

@twoeths twoeths marked this pull request as ready for review February 25, 2021 03:53
@twoeths twoeths requested a review from a team February 25, 2021 03:57
@dapplion
Copy link
Contributor

Could we investigate the hashing power of Prysm's and Lighthouse's respective sha256 libs?

@twoeths
Copy link
Contributor Author

twoeths commented Feb 26, 2021

Could we investigate the hashing power of Prysm's and Lighthouse's respective sha256 libs?

# minTime(ms) maxTime(ms) average(ms)
go 11 108 14
rust 55 262 63
as 61 480 82

@dapplion
Copy link
Contributor

dapplion commented Feb 26, 2021

Could we investigate the hashing power of Prysm's and Lighthouse's respective sha256 libs?

go 11 108 14
rust 55 262 63
as 61 480 82

That's to perform 1 hash or how many?

@MaxGraey
Copy link
Contributor

MaxGraey commented Feb 26, 2021

  • [Go] sha256 in Prysm uses simd optimized native SHA256

  • [Rust] sha256 in Lighthouse use sha2 crate which also native

  • [AssemblyScript] version of Sha256 use WebAasembly which slower than native and has interop overhead and without SIMD

I just want to draw your attention to this. Since, in essence, you are comparing 3 completely different platforms in different conditions

@twoeths
Copy link
Contributor Author

twoeths commented Feb 26, 2021

Could we investigate the hashing power of Prysm's and Lighthouse's respective sha256 libs?

go 11 108 14
rust 55 262 63
as 61 480 82

That's to perform 1 hash or how many?

it's to hash byte array from this string "lwkjt23uy45pojsdf;lnwo45y23po5i;lknwe;lknasdflnqw3uo5" 50000 times, similar to our performance test

@wemeetagain wemeetagain merged commit 9621ea9 into master May 4, 2021
@wemeetagain wemeetagain deleted the tuyen/performance-tests branch May 4, 2021 15:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants