Click here to Skip to main content
15,902,938 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: contiguous bits algorithm. Pin
Luc Pattyn3-Sep-07 5:37
sitebuilderLuc Pattyn3-Sep-07 5:37 
GeneralRe: contiguous bits algorithm. Pin
Russell'3-Sep-07 5:46
Russell'3-Sep-07 5:46 
GeneralRe: contiguous bits algorithm. Pin
cp98763-Sep-07 19:55
cp98763-Sep-07 19:55 
AnswerRe: contiguous bits algorithm. Pin
polyhedron4-Sep-07 16:47
polyhedron4-Sep-07 16:47 
AnswerRe: contiguous bits algorithm. Pin
Nelek12-Sep-07 5:05
protectorNelek12-Sep-07 5:05 
Questionwhich one would be faster? Pin
Mushtaque Nizamani2-Sep-07 21:30
Mushtaque Nizamani2-Sep-07 21:30 
AnswerRe: which one would be faster? Pin
Michael Dunn2-Sep-07 21:40
sitebuilderMichael Dunn2-Sep-07 21:40 
Answer Re: which one would be faster? Pin
Russell'2-Sep-07 22:03
Russell'2-Sep-07 22:03 
Mushq wrote:
sizeofsecondset(20)...sizeoffirstset(10000)


const UINT Sizeoffirstset =sizeoffirstset (10000); //this can help the compiler
const UINT Sizeofsecondset=sizeofsecondset(20);
for(i = 0; i < Sizeofsecondset; i++)
{
for (j=0; j < Sizeoffirstset; j++)
{
if(set2[i] == set1[j])
//do some thing
}
} 


I'm looking for differences, I see only that the initialization j=0 is computed Sizeofsecondset times ... so let Sizeofsecondset be the smaller number.
Smile | :)


Russell

JokeRe: which one would be faster? Pin
Russell'2-Sep-07 22:05
Russell'2-Sep-07 22:05 
AnswerRe: which one would be faster? Pin
rihdus2-Sep-07 22:21
rihdus2-Sep-07 22:21 
GeneralRe: which one would be faster? Pin
Russell'2-Sep-07 22:36
Russell'2-Sep-07 22:36 
GeneralRe: which one would be faster? Pin
Luc Pattyn3-Sep-07 5:43
sitebuilderLuc Pattyn3-Sep-07 5:43 
GeneralRe: which one would be faster? Pin
Mushtaque Nizamani2-Sep-07 22:51
Mushtaque Nizamani2-Sep-07 22:51 
GeneralRe: which one would be faster? Pin
chandu0042-Sep-07 23:17
chandu0042-Sep-07 23:17 
AnswerRe: which one would be faster? Pin
cp98763-Sep-07 0:02
cp98763-Sep-07 0:02 
AnswerRe: which one would be faster? Pin
Russell'3-Sep-07 0:13
Russell'3-Sep-07 0:13 
GeneralRe: which one would be faster? - Slightly OT Pin
blackjack21504-Sep-07 22:32
blackjack21504-Sep-07 22:32 
GeneralRe: which one would be faster? - Slightly OT Pin
Russell'4-Sep-07 22:47
Russell'4-Sep-07 22:47 
AnswerRe: which one would be faster? Pin
Chetan Patel10-Sep-07 0:43
Chetan Patel10-Sep-07 0:43 
Questioncan you tell me how to do this Pin
prasadbuddhika30-Aug-07 0:53
prasadbuddhika30-Aug-07 0:53 
AnswerRe: can you tell me how to do this Pin
cp987630-Aug-07 1:38
cp987630-Aug-07 1:38 
GeneralRe: can you tell me how to do this Pin
prasadbuddhika30-Aug-07 2:16
prasadbuddhika30-Aug-07 2:16 
GeneralRe: can you tell me how to do this Pin
cp987630-Aug-07 13:51
cp987630-Aug-07 13:51 
GeneralRe: can you tell me how to do this Pin
Russell'30-Aug-07 22:03
Russell'30-Aug-07 22:03 
GeneralRe: can you tell me how to do this Pin
Paul Conrad31-Aug-07 16:54
professionalPaul Conrad31-Aug-07 16:54 

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.