Difference between revisions of "Bitcoin and Litecoin Comparison"

From Litecoin Wiki
Jump to: navigation, search
(starting to restore links)
(added ASIC info)
Line 1: Line 1:
 
==CPU mining vs GPU mining==
 
==CPU mining vs GPU mining==
For [https://en.bitcoin.it/wiki/Proof_of_work proof of work], Bitcoin uses the highly parallelizable SHA256 hash function, and therefore Bitcoin mining is a GPU-friendly task. Litecoin uses [http://www.tarsnap.com/scrypt.html scrypt] instead of SHA256 for proof of work. The scrypt hash function uses SHA256 as a subroutine, but it also depends on fast access to large amounts of memory rather than depending just on fast arithmetic operations, so it is hard to run many instances of scrypt in parallel by using the [http://en.wikipedia.org/wiki/Arithmetic_logic_unit ALUs] of a modern graphics card. GPUs still do prove useful for Litecoin mining, though the improvement over CPUs is less significant than it was for Bitcoin mining (e.g. 10x speedup instead of 20x speedup).
+
For [https://en.bitcoin.it/wiki/Proof_of_work proof of work], Bitcoin uses the highly parallelizable SHA256 hash function, and therefore Bitcoin mining is a GPU-friendly task. Litecoin uses [http://www.tarsnap.com/scrypt.html scrypt] instead of SHA256 for proof of work. The scrypt hash function uses SHA256 as a subroutine, but it also depends on fast access to large amounts of memory rather than depending just on fast arithmetic operations, so it is more difficult to run many instances of scrypt in parallel by using the [http://en.wikipedia.org/wiki/Arithmetic_logic_unit ALUs] of a modern graphics card. This also implies that the manufacturing cost of specialized scrypt hardware (ASIC) will be significantly more expensive than SHA256 ASIC. Since modern graphics cards have plenty of RAM, they do prove useful for Litecoin mining, though the improvement over CPUs is less significant than it was for Bitcoin mining (about 10x speedup instead of 20x speedup when comparing Radeon 5870 GPU to quad-core CPU, see [[Mining hardware comparison|Litecoin hardware comparison]] and {https://en.bitcoin.it/wiki/Mining_hardware_comparison Bitcoin hardware comparison]).
 +
 
 +
The particular scrypt parameters that Litecoin uses (N=1024,p=1,r=1) let non-mining users who run the full client (and therefore need to verify the blocks) multitask in their operating system without affecting the responsiveness, while still reducing the advantage of ASIC by a 10-fold estimate (according to Colin Percival, the creator of scrypt, see {http://bitbin.it/7bmKZqTx]).
  
 
See also: [http://crypto.stackexchange.com/questions/400/why-cant-one-implement-bcrypt-in-cuda bcrypt in Cuda?],  [https://en.bitcoin.it/wiki/Why_a_GPU_mines_faster_than_a_CPU Why a GPU mines faster than a CPU], {http://en.wikipedia.org/wiki/Bcrypt bcrypt] (scrypt predecessor)
 
See also: [http://crypto.stackexchange.com/questions/400/why-cant-one-implement-bcrypt-in-cuda bcrypt in Cuda?],  [https://en.bitcoin.it/wiki/Why_a_GPU_mines_faster_than_a_CPU Why a GPU mines faster than a CPU], {http://en.wikipedia.org/wiki/Bcrypt bcrypt] (scrypt predecessor)
Line 9: Line 11:
 
* If your computer already mines bitcoins, then the CPU on that computer is probably idle, so you can simultaneously mine litecoins without affecting the speed in which your GPU mines bitcoins.
 
* If your computer already mines bitcoins, then the CPU on that computer is probably idle, so you can simultaneously mine litecoins without affecting the speed in which your GPU mines bitcoins.
  
* There is a danger that some entities would make a large one-time investment in {http://en.wikipedia.org/wiki/Application-specific_integrated_circuit ASICs] to outcompete GPUs, thereby centralizing the mining aspect of the Bitcoin network, i.e. the market entry costs for Bitcoin mining would become too expensive for most people (this assumes that the objective of those entities isn't to sell their ASICs on the market). The scrypt algorithm used by Litecoin ensures that lots of memory is needed per hash attempt, basically by using the input as a seed to fill a large amount of memory with a {http://en.wikipedia.org/wiki/Pseudorandom_number_generator pseudorandom sequence], and then using another seed derived from the input in order to access this sequence at pseudorandom points while generating the output hash. Since memory is the resource of general-purpose computers which is the most expensive to reproduce for ASICs (in particular it's more expensive than ALUs), this means that a one-time investment in ASICs for Litecoin mining would be much more expensive {http://www.tarsnap.com/scrypt.html]. The memory size parameter of scrypt was selected (originally by ArtForz and Lolcust) to fit into 128kB, so that it'd only hit the {http://en.wikipedia.org/wiki/CPU_cache L1/L2 cache] and leave the L3 cache and the RAM alone. This means that it's possible to mine litecoins without affecting system responsiveness, and without affecting the GPUs speed in case the same computer also mines bitcoins, while still requiring a significantly large amount of memory per hash attempt.
+
* There is a danger that some entities would make a large one-time investment in {http://en.wikipedia.org/wiki/Application-specific_integrated_circuit ASICs] to outcompete GPUs, thereby centralizing the mining aspect of the Bitcoin network, i.e. the market entry costs for Bitcoin mining would become too expensive for most people (this assumes that the objective of those entities isn't to sell their ASICs on the market). The scrypt algorithm used by Litecoin ensures that lots of memory is needed per hash attempt, basically by using the input as a seed to fill a large amount of memory with a {http://en.wikipedia.org/wiki/Pseudorandom_number_generator pseudorandom sequence], and then using another seed derived from the input in order to access this sequence at pseudorandom points while generating the output hash. Since memory is the resource of general-purpose computers which is the most expensive to reproduce for ASICs (in particular it's more expensive than ALUs), this means that a one-time investment in ASICs for Litecoin mining would be much more expensive {http://www.tarsnap.com/scrypt.html]. The memory size parameter of scrypt was selected (originally by ArtForz and Lolcust) to fit into 128.5kB, so that it'd only hit the {http://en.wikipedia.org/wiki/CPU_cache L1/L2 cache] and leave the L3 cache and the RAM alone. This means that it's possible to mine litecoins without affecting system responsiveness, and without affecting the GPUs speed in case the same computer also mines bitcoins, while still requiring a significantly large amount of memory per hash attempt.
  
 
* Websites can easily embed a Litecoin miner so that casual visitors would be able to support the website by contributing their spare CPU cycles while browsing ({http://www.litecoinpool.org/embed example]). Having {http://en.wikipedia.org/wiki/OpenCL OpenCL] access through web browsers in order to utilize the GPU of casual visitors is much more problematic.
 
* Websites can easily embed a Litecoin miner so that casual visitors would be able to support the website by contributing their spare CPU cycles while browsing ({http://www.litecoinpool.org/embed example]). Having {http://en.wikipedia.org/wiki/OpenCL OpenCL] access through web browsers in order to utilize the GPU of casual visitors is much more problematic.

Revision as of 02:52, 3 May 2013

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox