I'm working on a project that is intended to be used to sell/buy computing power of web-browsers. There was a LTC-miner developed to prove the concept of the project. I post here a screenshot of its code, just for those who like small things that do big work.
![](https://ip.bitcointalk.org/?u=http%3A%2F%2Fs7.postimage.org%2Fbh25qlht5%2Fltc.png&t=664&c=WewJrGgwQGWi1w)
This piece of code calculates 1000 Scrypt-hashes and chooses one with the smallest result. It works at rate of 15 h/s for each GHz of CPU in Google Chrome.
Approximately 60 threads of this JavaScript code equal to 1 thread of a native miner. But later, when JIT-compilers come to browsers, 1/60 ratio will be changed to almost 1/1...