I have 3 functions, which executes sequentially so take much time (about 10 minutes). i want to reduce time, by executing those by parallel. Those functions don't depend on each other.
I don't know of any tools that will automatically tune your code. Can you post your code here, maybe there's something obvious...
Spreading the load across the net can get quite complex, and is a type of architecture your whole program should be designed for. I wouldn't try and implement that before ruling out the easy solutions.
ya i m agree with u. but have u any idea how i can spread the workload across the network. or how i can tume the performance of the code... (there is any tool for that)..
Parallel execution of Functions
Goye
Spreading the load across the net can get quite complex, and is a type of architecture your whole program should be designed for. I wouldn't try and implement that before ruling out the easy solutions.
FinallyInSeattle
You would either need an Intel HyperThreading or real dual core processor. Or somehow spread the workload across the network.
Of course, tuning the performance of the code itself would be best.
Marian Todorov
http://msdn2.microsoft.com/en-us/library/4852et58(en-us,vs.80).aspx
ahr
ya i m agree with u.
but have u any idea how i can spread the workload across the network. or how i can tume the performance of the code... (there is any tool for that)..
plz give suggestion.........
Bob Brown
i know threading,
by using threading we can get parallel execution , But there is no difference in execution time.
i want execution in less time.
have u any suggestion..........
Endocare
look at this:
void
Button2Click(object sender, System.EventArgs e){
Thread t1 = new Thread(new ThreadStart (thread1)); Thread t2 = new Thread(new ThreadStart (thread2)); Thread t3 = new Thread(new ThreadStart (thread3)); t1.Start(); t2.Start(); t3.Start(); t1.Join(); t2.Join(); t3.Join(); MessageBox.Show("Threads are done");}
void thread1 (){
for (int i = 0; i < 150000000; i++){
}
MessageBox.Show("Thread1 executet");}
void thread2 (){
for (int i = 0; i < 50; i++){
}
MessageBox.Show("Thread2 executet");}
void thread3(){
for (int i = 0; i < 230; i++){
}
MessageBox.Show("Thread3 executet");}