Skip to content

Commit 6e60ae7

Browse files
authored
Update README.md
1 parent bbc4c9a commit 6e60ae7

1 file changed

Lines changed: 5 additions & 42 deletions

File tree

README.md

Lines changed: 5 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -69,51 +69,14 @@ print(hasher.hash("Hello, World!")) # Example usage
6969
4. **Finalization Rounds** – Enhanced diffusion eliminates weak patterns.
7070
5. **Output Generation** – 256-bit hexadecimal hash is returned.
7171

72-
## 🔬 Benchmarking (Coming Soon)
72+
## 🔬 Benchmarking
7373

74-
# 📊 HashX Benchmarking Report
74+
HashX has been tested against **SHA-256, BLAKE3, xxHash, and MurmurHash3** for speed and efficiency.
7575

76-
This document compares **HashX** with other popular hashing algorithms: **SHA-256, BLAKE3, and MurmurHash3**.
77-
The benchmark measures **speed (MB/s)**, **collision resistance**, and **avalanche effect**.
76+
### **Benchmark Results**
7877

79-
## 🔬 Benchmarking Script (Python)
80-
81-
Run the following script to test HashX performance:
82-
83-
```python
84-
import time
85-
import hashlib
86-
import blake3
87-
import mmh3
88-
from hashx import HashX
89-
90-
# Test Data (10MB)
91-
data = b"A" * (10 * 1024 * 1024)
92-
93-
def benchmark_hashing(algorithm, func):
94-
start = time.time()
95-
func(data)
96-
end = time.time()
97-
speed = (len(data) / (end - start)) / (1024 * 1024) # MB/s
98-
return speed
99-
100-
# Hashing functions
101-
hashx = HashX()
102-
tests = {
103-
"HashX": lambda d: hashx.hash(d),
104-
"SHA-256": lambda d: hashlib.sha256(d).hexdigest(),
105-
"BLAKE3": lambda d: blake3.blake3(d).hexdigest(),
106-
"MurmurHash3": lambda d: mmh3.hash_bytes(d)
107-
}
108-
109-
# Run Benchmark
110-
results = {name: benchmark_hashing(name, func) for name, func in tests.items()}
111-
112-
# Print Results
113-
print("\n📊 Benchmark Results:")
114-
for name, speed in results.items():
115-
print(f"{name}: {speed:.2f} MB/s")
116-
```
78+
For detailed benchmark results, check the full report:
79+
[📊 Benchmark Results](benchmark_results.md)
11780

11881
## 🛠️ Future Plans
11982

0 commit comments

Comments
 (0)