Skip to content

Commit 6b3af11

Browse files
committed
Update benchmarks to account for petrich's latest changes
Also change 150000 to 1024*1024 in a few benchmark scripts
1 parent a16d974 commit 6b3af11

7 files changed

+21
-21
lines changed

crypt/examples.html

+6-6
Original file line numberDiff line numberDiff line change
@@ -276,27 +276,27 @@ <h2>Speed Comparisons</h2>
276276
<tbody>
277277
<tr>
278278
<td><a href="movable-type.phps">movable-type.phps</a></td>
279-
<td>31.1147150993345</td>
279+
<td>28.2514320611955</td>
280280
</tr>
281281
<tr>
282282
<td><a href="phpaes.phps">phpaes.phps</a></td>
283-
<td>56.4934304952625</td>
283+
<td>50.1811164617535</td>
284284
</tr>
285285
<tr>
286286
<td><a href="phpclasses1.phps">phpclasses1.phps</a></td>
287-
<td>25.3963540792465</td>
287+
<td>22.9090529680255</td>
288288
</tr>
289289
<tr>
290290
<td><a href="phpclasses2.phps">phpclasses2.phps</a></td>
291-
<td>58.8358825445175</td>
291+
<td>51.9629266262055</td>
292292
</tr>
293293
<tr style="background: yellow">
294294
<td><a href="phpseclib-aes.phps">phpseclib-aes.phps</a></td>
295-
<td>8.3935635089874</td>
295+
<td>1.92589354515075</td>
296296
</tr>
297297
<tr style="background: yellow">
298298
<td><a href="phpseclib-rijndael.phps">phpseclib-rijndael.phps</a></td>
299-
<td>10.436311006546</td>
299+
<td>3.30701446533205</td>
300300
</tr>
301301
</tbody>
302302
</table>

crypt/movable-type.phps

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
2-
// 30.751706123352
3-
// 31.477724075317
2+
// 28.423454999924
3+
// 28.079409122467
44

55
// http://www.movable-type.co.uk/scripts/aes-php.html
66

@@ -13,7 +13,7 @@ for ($i = 0; $i < 1024*1024; $i++) {
1313

1414
$start = microtime(true);
1515

16-
AESEncryptCtr($plaintext, 'abcdefghijklmnop', 128);
16+
AESCtr::encrypt($plaintext, 'abcdefghijklmnop', 128);
1717

1818
$elapsed = microtime(true) - $start;
1919

crypt/phpaes.phps

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
2-
// 55.535305976868
3-
// 57.451555013657
2+
// 50.269048929214
3+
// 50.093183994293
44

55
// http://www.phpaes.com/
66

crypt/phpclasses1.phps

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
2-
// 25.180118083954
3-
// 25.612590074539
2+
// 22.58406496048
3+
// 23.234040975571
44

55
// http://www.phpclasses.org/browse/package/3650.html
66

crypt/phpclasses2.phps

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?php
2-
// 59.907835006714
3-
// 57.763930082321
2+
// 52.062352180481
3+
// 51.86350107193
44

55
// http://www.phpclasses.org/browse/package/4238.html
66

77
include('AESCipher.class.php');
88

99
$plaintext = '';
10-
for ($i = 0; $i < 150000; $i++) {
10+
for ($i = 0; $i < 1024*1024; $i++) {
1111
$plaintext.= chr(mt_rand(0, 255));
1212
}
1313

crypt/phpseclib-aes.phps

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
2-
// 8.2599170207977
3-
// 8.5272099971771
2+
// 1.8914740085602
3+
// 1.9603130817413
44

55
// http://phpseclib.sourceforge.net/
66

crypt/phpseclib-rijndael.phps

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?php
2-
// 10.424788951874
3-
// 10.447833061218
2+
// 3.2925698757172
3+
// 3.3214590549469
44

55
// http://phpseclib.sourceforge.net/
66

77
include('Crypt/Rijndael.php');
88

99
$plaintext = '';
10-
for ($i = 0; $i < 150000; $i++) {
10+
for ($i = 0; $i < 1024*1024; $i++) {
1111
$plaintext.= chr(mt_rand(0, 255));
1212
}
1313

0 commit comments

Comments
 (0)