|
Author |
Message |
Blueberry
Member |
Wow, that was one close run (or rather, two). Congratulations Scicco! ;)
I am quite astonished that the fast entries are so extremely close, when they use such different methods. Especially my two entries - they are completely different and should be nowhere near each other (the overflow version ought to be significantly faster, at least in the worst case).
It is almost as if the majority of the time was taken up by the final summing up, which is (effectively) identical for the three entries. But that just can't be the case:
0.04334 seconds * 50MHz = 2167000 clock cycles The largest pyramid has (30*30-30)/2 = 435 cells above the last row That gives at least 2167000/435 = 4981 cycles per cell - it should be more like 3 or 4.
I am curious as to how the running time was distributed between the pyramids. I noticed that about 90% of the pyramids have either the first or the last cell vacant. Since these run very fast, the time must be mostly used by the remaining 10%.
The result archive doesn't seem to contain the actual timing code (only the pyramids used). Are you willing to publish this, so we can dig deeper into the results?
|
scicco
Member |
Thanks - also to Sniper. It was very close and somehow I feel uncomfortable with winning both compos. I ran the code multiple times because I couldn't believe it. Anyway it took that long as there was a mem clear function clearing ~1 MB of mem and the template preparation code running before each solution cycle. This took most of the time. I did not separate the calculation code from the preparation code but compared the full run time of preparing and solving all pyramids. Anyway, even if I can't publish the whole speed code because it uses demo system code from StingRay I can publish the code that was run as main code to measure the run time. As I think that mainly you, Blueberry, are interested in diggin around I'll send it to you by mail. Anyway, if there is more interest I can publish it of course, just ask.
Concerning the next compo: I think at the moment it's a bit too hot to sit in front of the Amiga, so we'll just wait for some cooler weather then.
|
Lonewolf10
Member |
Is it cool enough now?!! ;)
Regards, Lonewolf10
|
|
|