1234567891011121314151617 |
- #include <crypt/BigInt64.hpp>
- #include <hash.hpp>
- #include <random>
- #include <iostream>
- #include <util.hpp>
- int main(){
- const int runs = 1000;
- std::mt19937_64 gen(54);
- std::vector<BigInt> vec(runs, BigInt(gen, 65536));
- std::vector<BigInt> hashes(runs);
- auto a = std::nanoTime();
- for(int i = 0;i < runs;i++){
- hashes[i] = sha512(vec[i]);
- }
- auto b = std::nanoTime();
- std::cout << (b - a) / 1000 / 1000.0 << " ms" << std::endl;
- }
|