Re: Need a Challenge?
- Posted by David Cuny <euphoria_coder at HOTMAIL.COM> Aug 16, 2001
- 403 views
This is a multi-part message in MIME format. ------=_NextPart_000_4043_7664_3b21 Irv Mullins wrote: >Wow. The following pgm runs in about 24 seconds; of course, this is a >compiled language. OK, I made a couple of changes to the code. First, I re-ordered the declaration of constants so they match those in the example program. This ensures the comparisons are fair. Next, I added pruning back into the code. It's rather oblique, but it only costs 6 lines of code. That brought the runtime down to about 12 seconds. Finally, I commented out the redundant tests (those that the pruning already took care of). That brought the runtime down to less than 6 seconds. Of course, my speed is dependant on the processor I used - you'll want to run it on your machine for comparison. And this is the interpreted version. I'd tried to compile it, but it complains that the Library and Translator both have to be the Complete Edition... (mild grumbling, since I should have both installed) -- David Cuny ------=_NextPart_000_4043_7664_3b21 Content-Type: text/plain; name="puzzle.ex"; format=flowed Content-Transfer-Encoding: 8bit