[VA] SRC #016 - Pi Day 2024 Special
|
03-17-2024, 08:59 PM
Post: #17
|
|||
|
|||
RE: [VA] SRC #016 - Pi Day 2024 Special
(03-17-2024 05:38 PM)DavidM Wrote:(03-16-2024 03:58 PM)Gerson W. Barbosa Wrote: P.S.: It took about one and a half hour, but I’ve finally obtained the results. Some optimizations are definitely required. That ran together with other concurrent tasks on my smartphone. In order to be fair, I repeated the run after disabling automatic screen lock and making sure the emulator was the only application running until completion. Now it took 1755.7s, barely half an hour. My second program elsewhere in this thread, running under the same conditions, took 841.6s, that is, less than 15 minutes. On the first program the counter was reset at the beginning of each decade; on the second program it was reset only in the beginning of the program, so past decade data could be used cumulatively on the next ones. This implied in about 11.11% speedup. Some additional 35% with obtained just by the use of CEIL, like C. Ret did, instead of INT with additional arguments. Another 3 or 4 percent were obtained by avoiding IF as in Juan’s program. The list processing of the pair of random numbers would take a little longer, according to my tests, so I let that behind. Overall about 50% faster than my first program, nothing that compares to your 18+ speedup when compared to my optimized program, though. Well done! Gerson. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)