java speed

I'm not aware of any magic commands that decrease the time complexity of a program. I would imagine the only way to make your program run quicker is to make optimisations in your solution. I'd be very interested to hear such commands exist though!
 
Depends on why it's going slow. If it's something like the JVM is spending a lot of time doing garbage collection due to you running close to your max heap size most of the time (defaults to 85 meg) then you can use the -Xmx command at run time to allocate more. You can also change which garbage collector, and some of its parameters too, but this is generally fine tuning, and won't fix problems like using an O(2^n) algorithm when an O(n^2) would do the job...
 
Back
Top Bottom