shepmaster / twox-hash

A Rust implementation of the XXHash algorithm.
MIT License
361 stars 41 forks source link

about reset #80

Open rockit-ba opened 2 years ago

rockit-ba commented 2 years ago

about reset

let mut hash = XxHash64::with_seed(0);
hash.write(...);
// reset here
let mut hash = XxHash64::with_seed(0);

Originally posted by @shepmaster in https://github.com/shepmaster/twox-hash/issues/72#issuecomment-879979172

How much better is it to recreate an object than to reset the internal value of a hash?

shepmaster commented 2 years ago

I don't understand the question. Can you rephrase it?

Do you believe there's a difference between recreating the object and "reset the internal value of a hash"?

rockit-ba commented 2 years ago

yes ,if in the Java ,there's a difference between recreating the object and "reset the internal value of a hash"? 

------------------ Original ------------------ From: Jake Goulding @.> Date: Sat,Nov 6,2021 8:43 AM To: shepmaster/twox-hash @.> Cc: 今天の吉祥君 @.>, Author @.> Subject: Re: [shepmaster/twox-hash] about reset (Issue #80)

I don't understand the question. Can you rephrase it?

Do you believe there's a difference between recreating the object and "reset the internal value of a hash"?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.