Closed
Description
- Version: v11.1.0
- Platform: Linux
- Subsystem: Crypto
I met a big performance degradation (about 6 times) with updating node version from 10.13.0 to 11.1.0. The scenario is: calculating many sha1 hashes of small strings (in my case theese are URLs, so about 20-50 bytes each).
const crypto = require('crypto');
const str = 'abcd'.repeat(10);
console.time('hash');
for(let i=0; i<1000000; ++i) {
const hash = crypto.createHash('sha1').update(str).digest();
}
console.timeEnd('hash');
node 10 output:
hash: 3336.388ms
node 11 output:
hash: 18088.861ms