4 ms·
Updated to 1ms! I'll work on the HTML stat updates Edit: fixed and fixed
by sil3ntmac 17y ago
Updated to 1ms! I'll work on the HTML stat updates
Edit: fixed and fixed
- m_eiman 17y agoYou could also make use of the fancy new worker thread stuff in browsers that support it. Should let you skip the timeout altogether.
- deleted 17y ago[deleted]
- rarestblog 17y agoNow we're talking! 7 tabs = 80% cpu usage! You might also consider lookup tables for Hamming distance (google for "counting bits").
- sil3ntmac 17y agoYeah, my JS hamming distance implementation is pretty miserable. I'm no bit wizard, but I thikn I can modify the SHA1 function (before it returns the value as a hex string) and XOR the 5 vars with the hex value that they gave us, and then count the set bits. Couldn't get it working last night though so I switched over to this
- rarestblog 17y agoYou might also consider removing UTF8Encoding from SHA1 implementation, I might be wrong, but I think contest states no encoding should be used - i.e. ASCII only. If that's a care, that's a useless O(N) operation.
- sp332 17y agoUTF8(ASCII) == ASCII Unless you're using characters > 255, UTF-8 is identical to ASCII.
- m_eiman 17y agoActually it's UTF8(ASCII) == ASCII iff ASCII < 128, since the MSB signifies a multi-byte character. http://en.wikipedia.org/wiki/UTF-8 http://en.wikipedia.org/wiki/UTF-8 Hm, on second thought UTF8(ASCII) is -always- == ASCII, since ASCII is only defined for 0-127, unless you count the extended variants :P http://en.wikipedia.org/wiki/ASCII http://en.wikipedia.org/wiki/ASCII
- andreyf 17y agoHah! I just generated as many hashes in a minute that I did in the hour I had it running beforehand. Good changes :)