Click here to Skip to main content
15,568,616 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: I didn't expect... Pin
Gary R. Wheeler27-Nov-22 12:15
Gary R. Wheeler27-Nov-22 12:15 
GeneralRe: I didn't expect... Pin
OriginalGriff27-Nov-22 20:55
mvaOriginalGriff27-Nov-22 20:55 
GeneralRe: I didn't expect... Pin
Daniel Pfeffer27-Nov-22 22:23
professionalDaniel Pfeffer27-Nov-22 22:23 
GeneralRe: I didn't expect... Pointer arithmetic Pin
jmaida27-Nov-22 13:13
jmaida27-Nov-22 13:13 
GeneralRe: I didn't expect... Pointer arithmetic Pin
CPallini27-Nov-22 22:39
mveCPallini27-Nov-22 22:39 
GeneralRe: I didn't expect... Pointer arithmetic Pin
jmaida28-Nov-22 7:55
jmaida28-Nov-22 7:55 
GeneralRe: I didn't expect... Pointer arithmetic Pin
CPallini28-Nov-22 11:41
mveCPallini28-Nov-22 11:41 
GeneralRe: I didn't expect... Pointer arithmetic Pin
jmaida28-Nov-22 15:41
jmaida28-Nov-22 15:41 
Test results using the STR_CountChar( char *s, char c, int m );
input string: gggggggggggggggggggggggggggggeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
Strength Length 80
Interations 50000000
CLOCKS PER SEC 1000
Non-Indexed Elapsed 5976
Index Elapsed 6444
so for 50,000,000 iterations and -O3 GCC optimization, non-indexed was ~.66 seconds faster
Timer used CPU clock ticks returned by C function clock();
Not a definitive test, but probably a good approximation
I used i9-9900 CPU @ 3.10ghz
"A little time, a little trouble, your better day"
Badfinger

GeneralRe: I didn't expect... Pointer arithmetic Pin
CPallini28-Nov-22 21:33
mveCPallini28-Nov-22 21:33 
GeneralRe: I didn't expect... Pointer arithmetic Pin
jmaida29-Nov-22 7:40
jmaida29-Nov-22 7:40 
GeneralRe: I didn't expect... Pointer arithmetic Pin
CPallini29-Nov-22 3:05
mveCPallini29-Nov-22 3:05 
GeneralRe: I didn't expect... Pin
Super Lloyd27-Nov-22 14:01
Super Lloyd27-Nov-22 14:01 
GeneralRe: I didn't expect... Pin
honey the codewitch27-Nov-22 6:52
mvahoney the codewitch27-Nov-22 6:52 
QuestionRe: I didn't expect... Pin
CPallini27-Nov-22 8:09
mveCPallini27-Nov-22 8:09 
AnswerRe: I didn't expect... Pin
0x01AA27-Nov-22 8:47
professional0x01AA27-Nov-22 8:47 
GeneralRe: I didn't expect... Pin
DRHuff27-Nov-22 9:16
DRHuff27-Nov-22 9:16 
GeneralRe: I didn't expect... Pin
Randor 2-Dec-22 20:54
professional Randor 2-Dec-22 20:54 
GeneralRe: I didn't expect... Pin
11917640 Member 27-Nov-22 21:03
11917640 Member 27-Nov-22 21:03 
GeneralRe: I didn't expect... Pin
Daniel Pfeffer27-Nov-22 22:20
professionalDaniel Pfeffer27-Nov-22 22:20 
GeneralRe: I didn't expect... Pin
11917640 Member 27-Nov-22 23:15
11917640 Member 27-Nov-22 23:15 
GeneralRe: I didn't expect... Pin
Peter Somos27-Nov-22 23:46
Peter Somos27-Nov-22 23:46 
GeneralRe: I didn't expect... Pin
pkfox28-Nov-22 1:00
professionalpkfox28-Nov-22 1:00 
GeneralRe: I didn't expect... Pin
11917640 Member 28-Nov-22 2:47
11917640 Member 28-Nov-22 2:47 
Generalworldle 310 Pin
jmaida26-Nov-22 20:04
jmaida26-Nov-22 20:04 
GeneralRe: worldle 310 Pin
Amarnath S26-Nov-22 20:17
professionalAmarnath S26-Nov-22 20:17 

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.


Straw Poll

Would you use ChatGPT to do your work?
We're just talking about whether you would, not whether you should.
  Results   286 votes