Hi Saad,
In addition to the previous considerations, normally on a single
processor machine, threaded programs will run slower than straight ahead
processing. That's due to start up, allocation, synchronization, context
switching and so on.
Threading is most helpful when another thread is idle and work can be
done during that idle time that otherwise couldn't be done until the waited
on task is complete. Examples are interactive programs waiting on user
input, socket programs waiting on a response, and so on. In what amounts to
batch processing, straight ahead should be faster. Specific OS algorithms
may, but probably won't affect that.
That could even be true with hyperthreading or multiprocessors,
depending on the other work going on; you have no guarantees that multiple
threads will run on different processors. Even so, often *perceived*
performance is better, and that can be very worthwhile, but I don't think
that's directly applicable in your case. Again, depends on what, if
anything, else your program is doing.
Joe Sam
Joe Sam Shirah - http://www.conceptgo.com
conceptGO - Consulting/Development/Outsourcing
Java Filter Forum: http://www.ibm.com/developerworks/java/
Just the JDBC FAQs: http://www.jguru.com/faq/JDBC
Going International? http://www.jguru.com/faq/I18N
Que Java400? http://www.jguru.com/faq/Java400
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden
This email sent to email@hidden