wood burning stoves 2.0*
The moose likes General Computing and the fly likes factors that may affect the execution time of a program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "factors that may affect the execution time of a program" Watch "factors that may affect the execution time of a program" New topic
Author

factors that may affect the execution time of a program

Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 980
    
    2
can anyone tell me "what are the factors that may affect the execution time of a program"???
and also how?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38007
    
  22
What do you think they are?
Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 980
    
    2
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

Joined: Oct 13, 2005
Posts: 38007
    
  22
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

Joined: Aug 20, 2011
Posts: 980
    
    2

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

Joined: May 14, 2008
Posts: 5812
    
    7

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.


JBoss In Action
Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 980
    
    2
Thank you Peter Johnson.
i m going to try this.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38007
    
  22
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: factors that may affect the execution time of a program
 
Similar Threads
static string
Scalability of JSP
Java Timing
java.net.ConnectException: Connection refused: connect
oracle SQL Execution Time