Giter VIP home page Giter VIP logo

hashrank's Introduction

VU ISI Blockchain course's hashing function benchmark

Hashrank is a tool designed to help rank VU ISI hashing algorithms. This benchmark will determine how fast and reliable your algorithm works.

The idea behind the benchmark

This benchmark is designed based on Blockchain Group's practical task analysys but with a few key changes:

  1. The size of random strings is 1000 characters. This size was chosen because the most difficult part of hashing algorithm is the compression of the input and 5 character long string is too short to require any compression (most of the time only padding will be made).
  2. Benchmark is not only calculating average of the similarity of pair of strings but also calculating the number of collisions it found.

Requirements for the hashing algorithm

  • It must accept string as Console Argument
  • It returns hash as a simple console output.
  • It must accept strings as long as 10000 characters
  • It has to have CMake or Makefile to be able to easily build the executable

What does this benchmark do?

It runs in three steps:

  1. Gets reference time of basic letter collision test using SHA256 algorithm (credits to emilisb for noticing this issue :D)
  2. Calculates the average time of hashing every line of "Konstitucija.txt" file.
  3. Calculates similarity score, time and collision number of pair of random strings that differ with one char
  4. Calculates similarity score, time and collision number of pair of random strings

How to run the benchmark

There are two main ways to do it:

  1. The easy one: contact me at: [email protected] and request me to run the benchmark for you in my machine (must submit the link to yours repository). Keep in mind that if there will be a lot of request I might not be able to run benchmark because of the shortage of time.
  2. The longer, but more pleasant one (for me :D):
  • You need to setup Python3 in your machine.
  • Need to install progress bar module by running $ pip / pip3 install tqdm
  • Build your executable by running $ sh build.sh and clean.sh to clean the directory.
  • Run $ python3 rank.py <name of the executable>
  • Add your results to the table below

To submit your results just make PR with your entry in the table below:

Legend
A - Average hashing time of "Konstitucija.txt"
B - Letter collision test time
C - Letter collision similarity average
D - Number of collisions found in Letter test
E - Word collision test time
F - Word collision similarity average
G - Number of collisions found in Word test

Github nick Link to the repo Course/group Reference test A B C D E F G
dqmis dqmis/vuhash 2/1 5.7301 0.0052 1417.6514 0.1108 9917 1497.0956s 0.0056 0
gytautele gytautele/blockchain 2/2 5.7201 0.0047 1043.5663 0.0136 0 1060.4037 0.0141 49
emilisb emilisb/Hash 2/2 5.3863 0.0035 804.7102 0.0108 0 820.5668 0.0108 0

hashrank's People

Contributors

dqmis avatar emilisb avatar gitguuddd avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.