Click here to Skip to main content
14,297,325 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: What is the difference between Regular and Decaf coffee? Pin
Richard Deeming9-May-19 1:28
mveRichard Deeming9-May-19 1:28 
GeneralRe: What is the difference between Regular and Decaf coffee? Pin
Slacker0079-May-19 2:58
professionalSlacker0079-May-19 2:58 
GeneralRe: What is the difference between Regular and Decaf coffee? Pin
RJOberg9-May-19 3:24
professionalRJOberg9-May-19 3:24 
GeneralRe: What is the difference between Regular and Decaf coffee? Pin
MarkTJohnson9-May-19 3:37
professionalMarkTJohnson9-May-19 3:37 
GeneralRe: What is the difference between Regular and Decaf coffee? Pin
Chris Quinn9-May-19 4:46
memberChris Quinn9-May-19 4:46 
GeneralRe: What is the difference between Regular and Decaf coffee? Pin
Daniel Pfeffer9-May-19 23:19
professionalDaniel Pfeffer9-May-19 23:19 
GeneralRe: What is the difference between Regular and Decaf coffee? Pin
steveb9-May-19 5:56
membersteveb9-May-19 5:56 
GeneralSurprised about the big difference Pin
Nelek8-May-19 20:58
protectorNelek8-May-19 20:58 
I already knew that the "%" (Modulo) operator is translated in a lot of instructions more than one would think at first glance and hence is a bit slower, but as I am trying to scratch every microsecond I can in my project...

I have just made a simple test:
50000 iterations and increasing a variable by one in each match
Loop 1: using i % 3 == 0 and i % 50 == 0
Loop 2: the same but using two helper counters instead. if count3 == 3 and count50 == 50

almost 300% performance difference OMG | :OMG: OMG | :OMG:

I didn't expect that much.
M.D.V. Wink | ;)

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.

GeneralRe: Surprised about the big difference Pin
OriginalGriff8-May-19 21:20
protectorOriginalGriff8-May-19 21:20 
GeneralRe: Surprised about the big difference Pin
harold aptroot8-May-19 22:03
memberharold aptroot8-May-19 22:03 
GeneralRe: Surprised about the big difference Pin
raddevus9-May-19 2:04
mvaraddevus9-May-19 2:04 
GeneralRe: Surprised about the big difference Pin
harold aptroot9-May-19 2:12
memberharold aptroot9-May-19 2:12 
GeneralRe: Surprised about the big difference Pin
Fueled By Caffeine8-May-19 21:26
memberFueled By Caffeine8-May-19 21:26 
GeneralRe: Surprised about the big difference Pin
OriginalGriff8-May-19 21:34
protectorOriginalGriff8-May-19 21:34 
GeneralRe: Surprised about the big difference Pin
harold aptroot8-May-19 22:01
memberharold aptroot8-May-19 22:01 
GeneralRe: Surprised about the big difference Pin
raddevus9-May-19 2:05
mvaraddevus9-May-19 2:05 
GeneralRe: Surprised about the big difference Pin
den2k888-May-19 21:50
professionalden2k888-May-19 21:50 
GeneralRe: Surprised about the big difference Pin
#realJSOP9-May-19 2:04
mve#realJSOP9-May-19 2:04 
GeneralRe: Surprised about the big difference Pin
den2k889-May-19 2:27
professionalden2k889-May-19 2:27 
GeneralRe: Surprised about the big difference Pin
Tim Deveaux8-May-19 22:31
memberTim Deveaux8-May-19 22:31 
GeneralRe: Surprised about the big difference Pin
Nelek8-May-19 23:11
protectorNelek8-May-19 23:11 
GeneralRe: Surprised about the big difference Pin
CodeWraith8-May-19 23:20
memberCodeWraith8-May-19 23:20 
GeneralRe: Surprised about the big difference Pin
Nelek9-May-19 0:41
protectorNelek9-May-19 0:41 
GeneralRe: Surprised about the big difference Pin
PIEBALDconsult9-May-19 3:32
protectorPIEBALDconsult9-May-19 3:32 
GeneralRe: Surprised about the big difference Pin
Rick York9-May-19 5:48
mveRick York9-May-19 5:48 

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.