Hashrank is a tool designed to help rank VU ISI hashing algorithms. This benchmark will determine how fast and reliable your algorithm works.
This benchmark is designed based on Blockchain Group's practical task analysys but with a few key changes:
- 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).
- Benchmark is not only calculating average of the similarity of pair of strings but also calculating the number of collisions it found.
- 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
It runs in three steps:
- Gets reference time of basic letter collision test using SHA256 algorithm (credits to emilisb for noticing this issue :D)
- Calculates the average time of hashing every line of "Konstitucija.txt" file.
- Calculates similarity score, time and collision number of pair of random strings that differ with one char
- Calculates similarity score, time and collision number of pair of random strings
There are two main ways to do it:
- 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. - 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
andclean.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 |