Commit 9a79bb69 authored by Ben Noordhuis's avatar Ben Noordhuis
Browse files

Avoid unnecessary buffer to string conversion.

Speeds up the benchmark below by about 680% (0.5s versus 3.4s on my Core 2 Duo).

    var crypto = require('crypto');
    var hash = crypto.createHash('sha1');
    var data = new Buffer(1024);
    for (var i = 0; i < 128 * 1024; ++i) hash.update(data);

Fixes #2494.
parent 472a72d2
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment