Click here to Skip to main content
15,867,568 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Performance problem with my FindOneOf function Pin
Skippums22-Jun-09 9:02
Skippums22-Jun-09 9:02 
GeneralRe: Performance problem with my FindOneOf function Pin
Stuart Dootson22-Jun-09 9:34
professionalStuart Dootson22-Jun-09 9:34 
GeneralRe: Performance problem with my FindOneOf function Pin
Ivan Ivanov 8322-Jun-09 11:28
Ivan Ivanov 8322-Jun-09 11:28 
AnswerRe: Performance problem with my FindOneOf function Pin
Roger Stoltz22-Jun-09 9:22
Roger Stoltz22-Jun-09 9:22 
GeneralRe: Performance problem with my FindOneOf function Pin
Ivan Ivanov 8322-Jun-09 10:59
Ivan Ivanov 8322-Jun-09 10:59 
GeneralRe: Performance problem with my FindOneOf function Pin
Roger Stoltz22-Jun-09 21:39
Roger Stoltz22-Jun-09 21:39 
GeneralRe: Performance problem with my FindOneOf function [modified] Pin
Ivan Ivanov 8324-Jun-09 1:45
Ivan Ivanov 8324-Jun-09 1:45 
GeneralRe: Performance problem with my FindOneOf function Pin
Roger Stoltz24-Jun-09 4:16
Roger Stoltz24-Jun-09 4:16 
Member 4399131 wrote:
Well I think I beat the standard runtime library!!!


Well done! Thumbs Up | :thumbsup:

However, since I read your answer to Stuart I understand you've implemented this using inline assembler. It would be really nice to write it in C/C++ in such way that the compiler would generate the same tight code. That would make it more portable.

The algorithm used is quite interesting...
I guess using a bit table will result in a lot of calculations in order to get the correct bit if not using inline assembler. If size of the table is not an issue I would try using chars or ints instead because then indirect addressing can be used, which I assume will faster.
For the sake of my own curiosity (and amusement) I'll try that and compare it.
I'm not aware of any statement in C that would make use of assembly bit manipulation instructions with bit numbers higher than e.g. 31 on a 32-bit system. So I guess inline assembler is the only choice.


"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"High speed never compensates for wrong direction!" - unknown


GeneralRe: Performance problem with my FindOneOf function [modified] Pin
Ivan Ivanov 8325-Jun-09 1:25
Ivan Ivanov 8325-Jun-09 1:25 
QuestionXMLHTTP post failed with status code 415 Pin
Ash_VCPP22-Jun-09 3:47
Ash_VCPP22-Jun-09 3:47 
AnswerRe: XMLHTTP post failed with status code 415 Pin
KarstenK22-Jun-09 4:15
mveKarstenK22-Jun-09 4:15 
QuestionTimer on Statusbar Pin
susanne122-Jun-09 3:10
susanne122-Jun-09 3:10 
AnswerRe: Timer on Statusbar Pin
Rajesh R Subramanian22-Jun-09 3:25
professionalRajesh R Subramanian22-Jun-09 3:25 
AnswerRe: Timer on Statusbar Pin
David Crow22-Jun-09 4:05
David Crow22-Jun-09 4:05 
QuestionHow to access element in Multiset by index Pin
alikalik22-Jun-09 3:05
alikalik22-Jun-09 3:05 
AnswerRe: How to access element in Multiset by index Pin
Chris Losinger22-Jun-09 3:13
professionalChris Losinger22-Jun-09 3:13 
GeneralRe: How to access element in Multiset by index Pin
alikalik22-Jun-09 3:30
alikalik22-Jun-09 3:30 
AnswerRe: How to access element in Multiset by index Pin
Sarath C22-Jun-09 3:20
Sarath C22-Jun-09 3:20 
Questionsplit wavefiles programetically Pin
N Vamshi Krishna22-Jun-09 3:04
N Vamshi Krishna22-Jun-09 3:04 
AnswerRe: split wavefiles programetically Pin
Rozis23-Jun-09 6:42
Rozis23-Jun-09 6:42 
QuestionPlease clarify my doubt.... Pin
Rakesh522-Jun-09 2:25
Rakesh522-Jun-09 2:25 
AnswerRe: Please clarify my doubt.... Pin
Stuart Dootson22-Jun-09 2:42
professionalStuart Dootson22-Jun-09 2:42 
QuestionAPI for changing Language for non-Unicode Programs???? Pin
Super Hornet22-Jun-09 1:39
Super Hornet22-Jun-09 1:39 
AnswerRe: API for changing Language for non-Unicode Programs???? Pin
Rajesh R Subramanian22-Jun-09 1:46
professionalRajesh R Subramanian22-Jun-09 1:46 
QuestionRe: API for changing Language for non-Unicode Programs???? Pin
Super Hornet22-Jun-09 1:50
Super Hornet22-Jun-09 1:50 

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.