feross / md5-password-cracker.js

Crack MD5 passwords with JavaScript Web Workers
http://feross.org/hacks/md5-password-cracker.js/
385 stars 69 forks source link

Use navigator.hardwareConcurrency for worker pool sizing #2

Closed eligrey closed 8 years ago

eligrey commented 8 years ago

I was going to suggest using navigator.hardwareConcurrency || 8 in https://github.com/feross/md5-password-cracker.js/blob/master/coordinator.js#L1 but your comment indicates that some carry logic will also need to be changed.

Btw, have you ever thought about md5 cracking with WebGL shaders? :P

feross commented 8 years ago

Yeah! I've thought about the WebGL shader approach, but after I learned that WebGL lacks integer support, and read an account of someone else who tried to do MD5 cracking using WebGL I gave up. Supposedly, the conversion from float to int for int-based operations is just too slow!

I think we can just leave it at 8. Users with fewer cores will still work fine, just with lots of CPU contention.