Click here to Skip to main content
15,895,256 members
Home / Discussions / C#
   

C#

 
QuestionLeft Top Ruler C# Pin
jojoba20113-May-10 5:27
jojoba20113-May-10 5:27 
AnswerRe: Left Top Ruler C# Pin
Pete O'Hanlon3-May-10 6:01
mvePete O'Hanlon3-May-10 6:01 
QuestionNeed to write a file to a server farm that is locked down by a ProcessID - this can't be THAT hard Pin
Alaric_3-May-10 5:02
professionalAlaric_3-May-10 5:02 
AnswerRe: Need to write a file to a server farm that is locked down by a ProcessID - this can't be THAT hard Pin
Michel Godfroid3-May-10 10:39
Michel Godfroid3-May-10 10:39 
GeneralRe: Need to write a file to a server farm that is locked down by a ProcessID - this can't be THAT hard Pin
Alaric_4-May-10 7:42
professionalAlaric_4-May-10 7:42 
AnswerRe: Need to write a file to a server farm that is locked down by a ProcessID - this can't be THAT hard Pin
Alaric_4-May-10 6:59
professionalAlaric_4-May-10 6:59 
Questioni wait so much because of loops Pin
karayel_kara3-May-10 3:30
karayel_kara3-May-10 3:30 
AnswerRe: i wait so much because of loops Pin
Luc Pattyn3-May-10 3:49
sitebuilderLuc Pattyn3-May-10 3:49 
Your inner loop is executing 8 billion times; no wonder it takes a while.

The Floyd-Warshall algorithm is O(n^3), so if you double the number of nodes in the graph, it will slow down another factor of 8. A brute force approach like this is reasonable only for small graphs.

One way to somewhat improve speed is by using pointers; multi-dimensional array lookup isn't very efficient.
Another possible improvement is getting better cache efficiency by reordering the operations (a bit tricky). And then you could go for more elaborate algorithms, requiring a lot more code.

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]

Prolific encyclopedia fixture proof-reader browser patron addict?
We all depend on the beast below.


modified on Monday, May 3, 2010 10:10 AM

AnswerRe: i wait so much because of loops Pin
Michel Godfroid3-May-10 4:04
Michel Godfroid3-May-10 4:04 
GeneralRe: i wait so much because of loops PinPopular
Luc Pattyn3-May-10 4:09
sitebuilderLuc Pattyn3-May-10 4:09 
AnswerRe: i wait so much because of loops [modified] Pin
William Winner3-May-10 8:15
William Winner3-May-10 8:15 
AnswerRe: i wait so much because of loops Pin
Pete O'Hanlon3-May-10 8:24
mvePete O'Hanlon3-May-10 8:24 
GeneralRe: i wait so much because of loops Pin
harold aptroot3-May-10 8:43
harold aptroot3-May-10 8:43 
GeneralRe: i wait so much because of loops Pin
Pete O'Hanlon3-May-10 8:56
mvePete O'Hanlon3-May-10 8:56 
GeneralRe: i wait so much because of loops [modified] Pin
Luc Pattyn3-May-10 9:28
sitebuilderLuc Pattyn3-May-10 9:28 
GeneralRe: i wait so much because of loops Pin
harold aptroot3-May-10 10:14
harold aptroot3-May-10 10:14 
GeneralRe: i wait so much because of loops Pin
Luc Pattyn3-May-10 10:16
sitebuilderLuc Pattyn3-May-10 10:16 
GeneralRe: i wait so much because of loops Pin
harold aptroot3-May-10 10:31
harold aptroot3-May-10 10:31 
GeneralRe: i wait so much because of loops Pin
Luc Pattyn3-May-10 10:36
sitebuilderLuc Pattyn3-May-10 10:36 
GeneralRe: i wait so much because of loops Pin
harold aptroot3-May-10 10:42
harold aptroot3-May-10 10:42 
GeneralRe: i wait so much because of loops Pin
Luc Pattyn3-May-10 10:56
sitebuilderLuc Pattyn3-May-10 10:56 
AnswerRe: i wait so much because of loops Pin
Pete O'Hanlon3-May-10 10:47
mvePete O'Hanlon3-May-10 10:47 
GeneralRe: i wait so much because of loops Pin
Luc Pattyn3-May-10 11:05
sitebuilderLuc Pattyn3-May-10 11:05 
GeneralRe: i wait so much because of loops Pin
Pete O'Hanlon3-May-10 11:16
mvePete O'Hanlon3-May-10 11:16 
GeneralRe: i wait so much because of loops Pin
Luc Pattyn3-May-10 11:26
sitebuilderLuc Pattyn3-May-10 11:26 

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.