Closed dcousens closed 9 years ago
I'm seeing a ~40% increase in speed, but that seems nuts. Can anyone else confirm?
I'm seeing a 25% increase in performance for the same optimization in SHA512 as well... which is great. Open to better ways to structure this.
I'm only seeing a much smaller improvement - more like 10%
you might find this interesting blakes2 has it's loops completely unrolled. I didn't implement it I just found it on github and published to npm.
It's the fastest js hash I have found!
@dominictarr that is also very difficult to read. IMHO that has to count for something?
Interesting that we got different results, I'm on Arch, Node v0.10.35 also.
I'm still consistently getting at least a 20% improvement for SHA256. 1 - (2380/2960) = ~20%
@dcousens I think the way to do it well would be some sort of macro that generates it. That would be much easier to audit than hand-written unrolled code.
merged into 2.3.5
@dominictarr agreed. I'll compare what performance gains can be had from this, and whether or not the speed gain can be found in something less obtrusive.
Exact same as #18, but for SHA256.
this pull request
2.3.4