Switch from SHA-1 to SHA-512 - #109
Conversation
| Digest { inner: Context::new(&SHA512) } | ||
| } | ||
|
|
||
| /// Calculate the SHA-1 digest of the contents of `path`, running |
| @@ -842,7 +840,6 @@ bar.rs: | |||
| drop(env_logger::init()); | |||
| let f = TestFixture::new(); | |||
| // SHA-1 digest of an empty file. | |||
|
Ah just realized I should update the ring dependency, so this now depends on ring 0.9 |
|
Ok I've rebased over #112, but something I realized was that ring 0.9 depends on Rust 1.17 so I bumped that dep, if that's a problem though I can change it back. |
|
@alexcrichton if you bump the required rust version in the .travis.yml, you should also bump it in the README. |
I don't love constantly bumping our version requirement to chase latest stable, but as long as it's mentioned in the README and enforced in our CI config it's not a dealbreaker for anything. |
luser
left a comment
There was a problem hiding this comment.
This looks good! Sorry I put sha1 in so many names so you had to change them all...
| // 5. The sha-1 digests of all files listed on the commandline (self.externs) | ||
| args.hash(&mut HashToDigest { digest: &mut m }); | ||
| // 4. The digest-1 digests of all source files (this includes src file from cmdline). | ||
| // 5. The digest-1 digests of all files listed on the commandline (self.externs) |
There was a problem hiding this comment.
These two comments got search-and-replaced into nonsense. :)
| &pool).wait().unwrap(); | ||
| let mut m = sha1::Sha1::new(); | ||
| let m = Digest::new(); | ||
| let empty_digest = m.finish(); |
Local benchmarking showed that the implementation of SHA-512 in the *ring* crate is 3x faster than the implementation of SHA-1 in the `sha1` crate. I've also noticed that 80%+ of sccache's runtime on a fully cached build is spent hashing. With this change I noticed a decrease from 108s to 92s when building a fully cached LLVM from the network. Not a huge win but if the network were faster could perhaps add up! Closes mozilla#108
|
@luser as a heads up I updated the "install rust" code in AppVeyor to use rustup, I think the old manifests may have not made their way to 1.17.0 |
|
Thanks! I copied that script from somewhere and haven't looked at it in a while. :) |
Both tutorials were missing .await on the client connect call, causing the compiler to issue errors. Thanks for alce#6260 on the #tonic-users discord channel for providing the answer.
Local benchmarking showed that the implementation of SHA-512 in the ring crate
is 3x faster than the implementation of SHA-1 in the
sha1crate. I've alsonoticed that 80%+ of sccache's runtime on a fully cached build is spent hashing.
With this change I noticed a decrease from 108s to 92s when building a fully
cached LLVM from the network. Not a huge win but if the network were faster
could perhaps add up!
Closes #108