Click here to Skip to main content
15,902,917 members
Home / Discussions / C#
   

C#

 
GeneralRe: Who can help me to solve this problem ? Pin
905607625@qq.com19-Jan-13 15:40
905607625@qq.com19-Jan-13 15:40 
GeneralRe: Who can help me to solve this problem ? Pin
Dave Kreskowiak19-Jan-13 15:47
mveDave Kreskowiak19-Jan-13 15:47 
GeneralRe: Who can help me to solve this problem ? Pin
Richard MacCutchan19-Jan-13 21:34
mveRichard MacCutchan19-Jan-13 21:34 
GeneralRe: Who can help me to solve this problem ? Pin
BobJanova21-Jan-13 5:47
BobJanova21-Jan-13 5:47 
AnswerRe: Who can help me to solve this problem ? Pin
Eddy Vluggen20-Jan-13 2:24
professionalEddy Vluggen20-Jan-13 2:24 
GeneralRe: Who can help me to solve this problem ? Pin
Dave Kreskowiak20-Jan-13 6:12
mveDave Kreskowiak20-Jan-13 6:12 
Questioncollections generic with wcf Pin
yonim12319-Jan-13 12:33
yonim12319-Jan-13 12:33 
AnswerRe: collections generic with wcf Pin
SledgeHammer0119-Jan-13 13:03
SledgeHammer0119-Jan-13 13:03 
GeneralRe: collections generic with wcf Pin
yonim12319-Jan-13 13:20
yonim12319-Jan-13 13:20 
QuestionCannot Access the form _ Cross-thread operation Pin
mohammadkaab19-Jan-13 9:50
mohammadkaab19-Jan-13 9:50 
AnswerRe: Cannot Access the form _ Cross-thread operation Pin
Jibesh19-Jan-13 21:29
professionalJibesh19-Jan-13 21:29 
AnswerRe: Cannot Access the form _ Cross-thread operation Pin
pt140120-Jan-13 22:13
pt140120-Jan-13 22:13 
GeneralRe: Cannot Access the form _ Cross-thread operation Pin
mohammadkaab21-Jan-13 20:26
mohammadkaab21-Jan-13 20:26 
Questionwcf p2p file transfering over internet Pin
vab26108519-Jan-13 2:03
vab26108519-Jan-13 2:03 
QuestionWorking with tab escape charecter Pin
Mc_Topaz19-Jan-13 1:49
Mc_Topaz19-Jan-13 1:49 
AnswerRe: Working with tab escape charecter Pin
Abhinav S19-Jan-13 2:38
Abhinav S19-Jan-13 2:38 
GeneralRe: Working with tab escape charecter Pin
Mc_Topaz19-Jan-13 3:22
Mc_Topaz19-Jan-13 3:22 
QuestionDesign-Time Error in the Windows Forms Designer Pin
_Q12_18-Jan-13 4:25
_Q12_18-Jan-13 4:25 
AnswerRe: Design-Time Error in the Windows Forms Designer Pin
Eddy Vluggen18-Jan-13 5:02
professionalEddy Vluggen18-Jan-13 5:02 
AnswerRe: Design-Time Error in the Windows Forms Designer Pin
Alan N18-Jan-13 5:42
Alan N18-Jan-13 5:42 
QuestionParalel QuickSort with 2 threads running at the same spped Pin
George Nistor18-Jan-13 0:51
George Nistor18-Jan-13 0:51 
AnswerRe: Paralel QuickSort with 2 threads running at the same spped Pin
Dave Kreskowiak18-Jan-13 4:20
mveDave Kreskowiak18-Jan-13 4:20 
GeneralRe: Paralel QuickSort with 2 threads running at the same spped Pin
George Nistor18-Jan-13 4:41
George Nistor18-Jan-13 4:41 
GeneralRe: Paralel QuickSort with 2 threads running at the same spped Pin
Dave Kreskowiak18-Jan-13 6:25
mveDave Kreskowiak18-Jan-13 6:25 
AnswerRe: Paralel QuickSort with 2 threads running at the same spped Pin
Alan Balkany18-Jan-13 5:12
Alan Balkany18-Jan-13 5:12 
I think the stack operations are slowing your algorithm. Quicksort only needs a simple array.

The generic operations that are "array-like" will reallocate a NEW array and copy all the elements to this array when the old array isn't long enough to hold a new element. This gives O(n^2) performance, which is slow. (Quicksort should be O(n log n)).

Using multiple threads to speed Quicksort is a good idea because the partitioning lets the threads work independently, without requiring synchronization. You just have to make sure your basic operations aren't wasting time.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.