Bitcoin Forum
May 10, 2024, 12:58:29 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: 🖤  (Read 115 times)
digaran (OP)
Copper Member
Hero Member
*****
Offline Offline

Activity: 1330
Merit: 899

🖤😏


View Profile
April 04, 2023, 04:22:37 AM
Last edit: January 20, 2024, 07:34:34 AM by digaran
 #1

🖤

🖤😏
1715345909
Hero Member
*
Offline Offline

Posts: 1715345909

View Profile Personal Message (Offline)

Ignore
1715345909
Reply with quote  #2

1715345909
Report to moderator
1715345909
Hero Member
*
Offline Offline

Posts: 1715345909

View Profile Personal Message (Offline)

Ignore
1715345909
Reply with quote  #2

1715345909
Report to moderator
Bitcoin mining is now a specialized and very risky industry, just like gold mining. Amateur miners are unlikely to make much money, and may even lose money. Bitcoin is much more than just mining, though!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715345909
Hero Member
*
Offline Offline

Posts: 1715345909

View Profile Personal Message (Offline)

Ignore
1715345909
Reply with quote  #2

1715345909
Report to moderator
1715345909
Hero Member
*
Offline Offline

Posts: 1715345909

View Profile Personal Message (Offline)

Ignore
1715345909
Reply with quote  #2

1715345909
Report to moderator
1715345909
Hero Member
*
Offline Offline

Posts: 1715345909

View Profile Personal Message (Offline)

Ignore
1715345909
Reply with quote  #2

1715345909
Report to moderator
garlonicon
Hero Member
*****
Offline Offline

Activity: 804
Merit: 1932


View Profile
April 04, 2023, 05:20:05 AM
Merited by pooya87 (4), BlackHatCoiner (4), ABCbits (1)
 #2

Quote
Could anyone please be so kind and provide the information needed?
It depends on your algorithm. Those values can be different, it depends for example if you use CPU, GPU, FPGA or ASIC, and what is your software. Because in case of SHA-256, there are ASICs that can compute 2^32 hashes in seconds, but on CPUs it will take something between 10 minutes and 1 hour (if you use fast enough implementation). But in general, if you have some program for doing that, then you can measure it with "time" command.
Code:
$ time sha256sum empty.txt
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855  empty.txt

real 0m0,001s
user 0m0,001s
sys 0m0,000s
But usually, you don't want to measure a single operation, but N operations instead.
Code:
$ cat counter.sh
#!/bin/bash
for ((i = 0 ; i < 100000 ; i++)); do
    echo $i > empty.txt
    sha256sum empty.txt > empty.txt
done

$ time ./counter.sh

real 2m6,745s
user 1m21,960s
sys 0m41,309s
As you can see, this bash script is very slow, it can do 100k hashes in 2 minutes, so it cannot even mine blocks at difficulty one. And those numbers for other hashes and algorithms will be different, because it depends on your hardware, and your implementation.
NotATether
Legendary
*
Offline Offline

Activity: 1596
Merit: 6734


bitcoincleanup.com / bitmixlist.org


View Profile WWW
April 04, 2023, 08:32:50 AM
Merited by pooya87 (2), FP91G (1)
 #3

It depends on your algorithm. Those values can be different, it depends for example if you use CPU, GPU, FPGA or ASIC, and what is your software. Because in case of SHA-256, there are ASICs that can compute 2^32 hashes in seconds, but on CPUs it will take something between 10 minutes and 1 hour (if you use fast enough implementation). But in general, if you have some program for doing that, then you can measure it with "time" command.
Code:
$ time sha256sum empty.txt
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855  empty.txt

real 0m0,001s
user 0m0,001s
sys 0m0,000s

You actually should not be using time to benchmark these operations if you're running them on GPUs and other specialized silicon, because (and you probably know this as well) it only logs CPU time, whereas these operations when used on CPUs are limited to verifying other transactions and blocks.

Ok, thanks for the reply, to make it easier, software is the fastest vanity search engine, and hardware is the latest GPU/ fastest.

For NVIDIA GPUs, you can start by using nvbench: https://github.com/NVIDIA/nvbench

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
ABCbits
Legendary
*
Offline Offline

Activity: 2870
Merit: 7492


Crypto Swap Exchange


View Profile
April 04, 2023, 10:30:20 AM
Merited by pooya87 (2)
 #4

Quote
Could anyone please be so kind and provide the information needed?
It depends on your algorithm. Those values can be different, it depends for example if you use CPU, GPU, FPGA or ASIC, and what is your software.

--snip--

FWIW newer x86[1] and ARMv8[2] CPU also have instruction set specifically set for SHA algorithm.

--snip--
if there is a formula to calculate them, I'd appreciate it.

By any chance, do you mean something like this https://stackoverflow.com/a/11005919 ?

[1] https://en.wikipedia.org/wiki/Intel_SHA_extensions
[2] https://en.wikichip.org/wiki/arm/armv8

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1512
Merit: 7359


Farewell, Leo


View Profile
April 04, 2023, 12:38:27 PM
 #5

It depends on your algorithm.
It also depends on the programming language you used to implement the algorithm. sha256sum is written in C, so you should expect maximum performance. Other implementations require more time.

For NVIDIA GPUs, you can start by using nvbench: https://github.com/NVIDIA/nvbench
Not sure if it's the same, but for measuring GPU performance, NVIDEA recommends Visual Profiler: https://docs.alliancecan.ca/wiki/Nvprof

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
garlonicon
Hero Member
*****
Offline Offline

Activity: 804
Merit: 1932


View Profile
April 05, 2023, 05:05:39 PM
Merited by ABCbits (1)
 #6

Quote
Do any of you know which operation is the most expensive one?
Probably ECDSA-related things, so going from private to public key. Hashing is usually fast, because that part is heavily optimized for speed. However, you cannot optimize ECDSA that easily. And also there are reasons why OP_CHECKSIG alone (without hashing public keys) is costly, and there is "sigops limit", but you have no "hashops limit". Even recently we had a block that exceeded those limits, and was rejected for that reason: https://bitcointalk.org/index.php?topic=5447129.0
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!