Skip to content

Commit e213df9

Browse files
authored
nice round number + argv[1]
quote: @nikic I don't think there's any point in preserving the exact previous size. Let's make this a nice round number like 2048. Could also make it $argv[1] ?? 2048 to allow passing a different size :)
1 parent 0fe04c5 commit e213df9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ext/hash/bench.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33

44
error_reporting(E_ALL);
55

6-
// 2240 comes from the fact that it used to be file_get_contents(__FILE__);
7-
$data = str_repeat("\x00", 2240);
6+
$data = str_repeat("\x00", (int) ($argv[1] ?? (2 * 1024)));
87
$time = array();
98
foreach (hash_algos() as $algo) {
109
$time[$algo] = 0;

0 commit comments

Comments
 (0)