SPEEDING UP THE CODE

Let's talk about algorithms!

Moderator: Board moderators

Post Reply
ElSoloMar
New poster
Posts: 9
Joined: Thu Jan 09, 2003 9:42 am
Contact:

SPEEDING UP THE CODE

Post 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
prilmeie
New poster
Posts: 13
Joined: Fri Jan 03, 2003 2:21 pm
Location: Germany
Contact:

Post 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
Post Reply

Return to “Algorithms”