Page 1 of 1

SPEEDING UP THE CODE

Posted: Sat Jan 11, 2003 6:56 am
by ElSoloMar
8) Hola Again!

Guys could you offer me some technics for speeding up my code. Any
general, intermediate or advanced technics will do. Links to documentation
and tutorials, not on general knowledge of the language, but on code
optimizations or perfomance. You can list your favourites tricks so every body
can beneficial from them. Thanks! :D

Posted: Wed Jan 15, 2003 7:55 pm
by prilmeie
A general tip might be: Reuse allready calculated values. You can do this as follows:
  • Read the complete input.
  • Determine which input values lead to the same output, i.e. be sure to know about equivalence classes of input data.
  • Reuse exactly those values (and not all values), that way you can save some memory instead of storing all calculated results and time instead of calculating the result values again.
I haven't used this technique yet, but I am sure it will work.

Regards,
Franz