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

in programming •  7 years ago 

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!

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

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

  ·  7 years ago (edited)

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

  ·  7 years ago (edited)

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

THANK YOU FOR THIS INCREDIBLE INFORMATION

  ·  7 years ago Reveal Comment

where to submit the solution?

dead?