This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import hashlib | |
| import os | |
| import time | |
| # Function to generate a large binary data set (e.g., 100 MB) | |
| def generate_large_binary_data(size_in_mb): | |
| # Generate random binary data of the specified size | |
| return os.urandom(size_in_mb * 1024 * 1024) # Convert MB to bytes | |
| # Function to compute multiple hashes from the same data input and measure time per hasher |
OlderNewer