Viewing a response to: @quantumdeveloper/computation-contest-9-2-sbi
https://github.com/billyb2/quantum-developer-contests/blob/master/comp-contest-%239.html Saves as much computation power as possible by limiting the amount of operations. Also works for negative multiplication. Unfortuantely, it's slows down for much larger numbers, and is in general slower since it runs in the browser. It tries to improve efficiency as well as possible, however, by having adding the larger number to itself instead of just picking the first number.
author | bootlegbilly | ||||||
---|---|---|---|---|---|---|---|
permlink | re-quantumdeveloper-202012t1547792z | ||||||
category | programming | ||||||
json_metadata | {"app":"steemit/0.1","format":"markdown+html","community":"esteem.app","links":["https://github.com/billyb2/quantum-developer-contests/blob/master/comp-contest-%239.html"]} | ||||||
created | 2020-01-02 20:04:09 | ||||||
last_update | 2020-01-03 17:17:06 | ||||||
depth | 1 | ||||||
children | 2 | ||||||
last_payout | 2020-01-09 20:04:09 | ||||||
cashout_time | 1969-12-31 23:59:59 | ||||||
total_payout_value | 0.000 HBD | ||||||
curator_payout_value | 0.000 HBD | ||||||
pending_payout_value | 0.000 HBD | ||||||
promoted | 0.000 HBD | ||||||
body_length | 471 | ||||||
author_reputation | 1,522,279,533,235 | ||||||
root_title | "Computation Contest #9 [2 SBI]" | ||||||
beneficiaries |
| ||||||
max_accepted_payout | 1,000,000.000 HBD | ||||||
percent_hbd | 10,000 | ||||||
post_id | 93,962,401 | ||||||
net_rshares | 5,378,564,158 | ||||||
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
quantumdeveloper | 0 | 4,876,558,549 | 100% | ||
torsteoe | 0 | 502,005,609 | 100% |
What you did is just implementing "the intuitive algorithm of simple repeated addition" which I mentioned in the problem which is as you correctly discovered very slow because you need `number2` additions. You need to find something better. By the way I ignore the speed differences of individual languages in these contests, because the algorithm would still be slow in any other language.
author | quantumdeveloper |
---|---|
permlink | q3oq0m |
category | programming |
json_metadata | {"app":"steemit/0.1"} |
created | 2020-01-06 12:14:48 |
last_update | 2020-01-06 12:14:48 |
depth | 2 |
children | 1 |
last_payout | 2020-01-13 12:14:48 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 391 |
author_reputation | 4,456,611,502,865 |
root_title | "Computation Contest #9 [2 SBI]" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 94,093,184 |
net_rshares | 2,071,072,017 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
bootlegbilly | 0 | 2,071,072,017 | 100% |
Thanks for the information, I'll work on redoing my answer now!
author | bootlegbilly | ||||||
---|---|---|---|---|---|---|---|
permlink | re-quantumdeveloper-202016t13131158z | ||||||
category | programming | ||||||
json_metadata | {"tags":["esteem"],"app":"esteem/2.2.2-mobile","format":"markdown+html","community":"esteem.app"} | ||||||
created | 2020-01-06 18:13:00 | ||||||
last_update | 2020-01-06 18:13:00 | ||||||
depth | 3 | ||||||
children | 0 | ||||||
last_payout | 2020-01-13 18:13:00 | ||||||
cashout_time | 1969-12-31 23:59:59 | ||||||
total_payout_value | 0.000 HBD | ||||||
curator_payout_value | 0.000 HBD | ||||||
pending_payout_value | 0.000 HBD | ||||||
promoted | 0.000 HBD | ||||||
body_length | 63 | ||||||
author_reputation | 1,522,279,533,235 | ||||||
root_title | "Computation Contest #9 [2 SBI]" | ||||||
beneficiaries |
| ||||||
max_accepted_payout | 1,000,000.000 HBD | ||||||
percent_hbd | 10,000 | ||||||
post_id | 94,104,771 | ||||||
net_rshares | 0 |