Daily Steem-Python Challenge #21, Win 1 Steem!

For each tutorial we release there will be a relevant challenge where the winner receives 1 STEEM!

Challenge

Take the code from the tutorial from here and change it to be able to do the following

  1. Determine the most optimal amount of threads for your CPU and plot this. Time each session and use this data to make a plot which shows where there is no more benefit of adding any additional threads. To keep it simple stick to a fixed block count of 1000.

That's it! Good luck to everyone participating!

Deadline

The prize money will be rewarded to the person that solves the problem first. If there is no solution within 7 days after this post has been submitted the prize pool expires.

Relevant Tutorial


If you have questions about the tutorial or the challenge then don't hesitate to comment below or contact us on Discord!

Sort:  

Tutorial yang bagus @ steempytutorials

Here's my solution

I've assumed that the number of threads is optimal, when the addition of a new one improves the execution time of the algorithm by less than 5%. you can change this value by modifying STOP_CONDITION variable.

I've also changed head_block = blockchain.get_current_block_num()-int(sys.argv[1]) to head_block = blockchain.get_current_block_num(), which I believe is correct

I really very excited for it
I already learn python very easy language obviously it is a high level language which is easy for human
I am ready

siplah pokoknya

How would I share my solution? Paste the relevant code as a comment?

THANK YOU FOR THIS INCREDIBLE INFORMATION

Excellent information. Thanks alot.

where to submit the solution?

Coin Marketplace

STEEM 0.32
TRX 0.11
JST 0.034
BTC 66384.36
ETH 3272.25
USDT 1.00
SBD 4.27