>> I had a lot of "spaghetti" code which took close to two
>> hours to finish. Then I rewrote the program by
>> dividing it into separate units...optimize...After the
>> change the code...finished in five seconds.
>
>
>2 hours to 5 seconds is not the result of spaghetti code.
No, but the spaghetti code was almost impossible to debug, and it was also difficult to isolate the slow parts.