标签:sha1 nbsp ola mat form ejs begin node cti
首先上我最常用且最易用的PHP来做下测试
<?php function test_encrypt($fun, $max) { $begin = microtime(TRUE); $pwdpre = time(); for ($i = 1; $i <= $max; $i++) { $fun($pwdpre . $i); } echo $fun . ‘ => ‘ . number_format((microtime(TRUE) - $begin) * 1000, 2) . ‘ ms‘ . "\r\n"; } test_encrypt(‘crc32‘, 1000 * 1000); //165.52ms test_encrypt(‘md5‘, 1000 * 1000); //390.99ms test_encrypt(‘sha1‘, 1000 * 1000); //488.63.ms
不同程序语言处理加密算法的性能对比(PHP/Golang/NodeJS)
标签:sha1 nbsp ola mat form ejs begin node cti
原文地址:https://www.cnblogs.com/xiangxisheng/p/14152884.html