create account

RE: Python Code Speed Improvement by modrzew

View this thread on: hive.blogpeakd.comecency.com

Viewing a response to: @profitgenerator/re-modrzew-re-profitgenerator-python-code-speed-improvement-20171121t224317200z

· @modrzew ·
...and then you'd have to `eval` that long string to get an array which would be even slower, not to say completely unsafe 😉

If your calculation takes 2 hours, then I'd say replacing `for` loops with manually typed array accesses is not the best place to optimize. Most likely something else takes long to finish.

Have you tried [profiling your code](https://docs.python.org/3/library/profile.html)?
👍  
properties (23)
authormodrzew
permlinkre-profitgenerator-re-modrzew-re-profitgenerator-python-code-speed-improvement-20171122t005750495z
categorypython
json_metadata{"tags":["python"],"links":["https://docs.python.org/3/library/profile.html"],"app":"steemit/0.1"}
created2017-11-22 00:57:51
last_update2017-11-22 00:57:51
depth3
children0
last_payout2017-11-29 00:57:51
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length401
author_reputation512,745,973,730
root_title"Python Code Speed Improvement"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id21,147,682
net_rshares0
author_curate_reward""
vote details (1)