- CPU: AMD Ryzen 7 5800X3D
- CPU Cooler: be quiet! Dark Rock 4 Pro
- Motherboard: X570 AORUS MASTER
- GPU: ASUS TUF Gaming GeForce RTX™ 4070 Ti
- CPU: AMD Ryzen 7 5800X
- CPU Cooler: be quiet! Dark Rock 4 Pro
- Motherboard: X570 AORUS MASTER
- GPU: EVGA GeForce RTX 3080 FTW3 ULTRA GAMING
- RAM: G.SKILL Ripjaws V Series 64GB
- Storage
- 2018 Mac Mini
- Intel Core i7-8700B, 6-cores @3.2GHz
- 32 GB DDR4 RAM
- 512GB Internal Volume
- ASUS ROG SWIFT PG279Q
- HDMI (macOS)
This file contains 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
#!/usr/bin/env ruby | |
require 'digest' | |
def getHash(data, iterations) | |
for i in 1..iterations-1 | |
data = Digest::SHA256.digest data | |
end | |
Digest::SHA256.hexdigest data | |
end |
This file contains 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
#!/usr/bin/php | |
<?php | |
$iterations = $argv[1] ? $argv[1] : 1; | |
$file = "rand.txt"; | |
$dat = file_get_contents($file); | |
$dat = getHash($dat, $iterations); | |
echo $dat . "\n"; |
This file contains 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
N=1 | |
PHP: 0.089 | |
Ruby: 0.140 | |
Go: 0.008 | |
Elixir: 0.00048 | |
N=10 | |
PHP: 0.092 | |
Ruby: 0.138 | |
Go: 0.006 |
This file contains 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
defmodule HashData do | |
def open_file do | |
File.read! "rand.txt" | |
end | |
def hash_contents(n) do | |
open_file() | |
|> hash_contents(n) | |
end |
This file contains 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
package main | |
import ( | |
"crypto/sha256" | |
"fmt" | |
"io/ioutil" | |
"os" | |
"strconv" | |
) |
NewerOlder