Reputation: 23035
Does a short path makes Java code to run faster? For example, will a file in "C:\Java\test.java" run faster than the same file in "C:\Users\Sepala\Documents\NetBeansProjects\BeanSupport\src\ejb\test.java"?
Upvotes: 0
Views: 107
Reputation: 5380
Its not your cup of tea just decide the path and let your code reach up-to. Its Even not noticeable for you. Your is to make sure about file existence and access permissions over it.
Upvotes: 1
Reputation: 9223
If you want to test this out, write yourself a Timer class.
public class Timer
{
private long mInitialTime;
public Timer()
{
start();
}
public void start()
{
mInitialTime = System.currentTimeMillis();
}
public String end(String description)
{
long finalTime = System.currentTimeMillis() - mInitialTime;
return description + ": total time " + finalTime;
}
}
At the start of main()
call start()
then at the end of main()
call end("completed")
.
Upvotes: 3
Reputation: 15675
Being practical, it's not going to make a difference. Being very picky, your filesystem might have an influence, but it's not going to be something you'll notice.
Upvotes: 7