Home > Algorithms, General > Optimize your program to run faster

Optimize your program to run faster

We all knew that the fewer the instructions in a program, the faster the program executes! When any program is executed, the kind of data structures they utilize and the kind of algorithm utilized decides the fate of fastness and memory space used by the program. An efficient programmer is the one who keeps these two things in mind while programming.

It happened to me many times, when ever I go to my older code I keep getting new ideas and happen to remove lot of obsolete statements or optimize the program instructions to achieve the same end result. This optimization helped me many a times to improve the overall performance of the program. On the other hand, it gets really difficult after a limit of extent to improve an individual program. This limit is some times called as Information Theoretic Limit.

According to it, given the approach of the algorithm and the design of a data structure, no improvement can be made to the program to make it run faster!

What ‘am trying to convey here is that Optimization of the code is the most important factor to make programs run quickly.

Note: comments are never considered an instruction by the compiler, hence removing it or retaining it is not going to make programs faster!

  1. January 21, 2015 at 4:08 AM

    Reblogged this on mylearningsbits.


  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: