• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

factors that may affect the execution time of a program

 
Punit Jain
Ranch Hand
Posts: 1015
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can anyone tell me "what are the factors that may affect the execution time of a program"???
and also how?
 
Campbell Ritchie
Sheriff
Pie
Posts: 50168
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you think they are?
 
Punit Jain
Ranch Hand
Posts: 1015
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i did a google search, but didn't find anything..
but i think they may be.
1.> the programming style.
2.> the approach used to solve the problem.
3.> the computer speed.
4.> on the programming language.

are they?
 
Campbell Ritchie
Sheriff
Pie
Posts: 50168
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let’s have a look at the language first. I tried Googling and found lots. This was the top “hit” Look at that first, then we can consider the other points later.
 
Punit Jain
Ranch Hand
Posts: 1015
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Let’s have a look at the language first. I tried Googling and found lots. This was the top “hit” Look at that first, then we can consider the other points later.

but this is specific to java.
but i want to know the general factors, that are valid for most of the programming language.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The whole point of the data structures and algorithms class in college is to show you that the choice of algorithm and data structures used to perform a task has a huge impact on the performance of an application.

Then in today's interconnected world, the "chattiness" of an interface between system is also a huge factor. To see this in action, try this experiment: copy 10000 small files from one system to the other. Now try again but this time package all 10000 files into a single file (a compressed file would be best, but even a TAR file will should prove the point). Then transfer the file. Finally unpack it. The package, transfer, unpackage should run in a faction of the time. So asking for one huge thing across an interconnect is often a time saver. It is a time waster, however, if you want only one piece of information. In other words, don't ask for all 10000 files if you want only one. (But then again, this is simple data structures and algorithms again.)

Personally, I don't think that you should limit your choice of language based on pure run time performance of the possible languages. If we did then we would all still be coding in assembler. However, there are applications where every clock cycle counts; for those you need assembler or something that comes really close.
 
Punit Jain
Ranch Hand
Posts: 1015
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Peter Johnson.
i m going to try this.
 
Campbell Ritchie
Sheriff
Pie
Posts: 50168
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Punit Jain wrote: . . . but this is specific to java.
No it isn’t.
but i want to know the general factors, that are valid for most of the programming language.
Those factors can be applied to any language. Read it, learn the pronciples, and then consider the other points you raised earlier.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic