Chuck,
On 4/26/16 12:18 PM, Caldarale, Charles R wrote:
>> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
>> Subject: Re: OT if/else or not if/else
>
>> Unless the JIT can prove that there are no side-effects, it's not
>> going to perform an
> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> Subject: Re: OT if/else or not if/else
> Unless the JIT can prove that there are no side-effects, it's not
> going to perform any speculative computations for a possible branch.
True, but due to inlining of
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Chuck,
On 4/25/16 4:54 PM, Caldarale, Charles R wrote:
>> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
>> Subject: Re: OT if/else or not if/else
>
>> If you use else-less-if, then there is nev
> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> Subject: Re: OT if/else or not if/else
> If you use else-less-if, then there is never an opportunity for
> parellelization, since the program is going to assume that those
> predicates are (a) independent and (
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Leon,
On 4/25/16 10:38 AM, Leon Rosenberg wrote:
> On Mon, Apr 25, 2016 at 4:13 PM, Christopher Schultz <
> ch...@christopherschultz.net> wrote:
>
> Leon,
>
> On 4/22/16 12:24 PM, Leon Rosenberg wrote:
Hi guys,
>
> I would always choose
On 4/25/2016 11:44 AM, Leon Rosenberg wrote:
On Mon, Apr 25, 2016 at 5:21 PM, Dougherty, Gregory T., M.S. <
dougherty.greg...@mayo.edu> wrote:
Yes, we do, because, well, it is more informative. :-)
if (a) Š
else if (b) Š
else if (c) Š
Says you have three mutually exclusive options, and impl
On 4/25/16, 10:44 AM, "Leon Rosenberg" wrote:
>On Mon, Apr 25, 2016 at 5:21 PM, Dougherty, Gregory T., M.S. <
>dougherty.greg...@mayo.edu> wrote:
>
>>
>>
>> Yes, we do, because, well, it is more informative. :-)
>>
>> if (a) Š
>> else if (b) Š
>> else if (c) Š
>>
>> Says you have three mutually
On Mon, Apr 25, 2016 at 5:21 PM, Dougherty, Gregory T., M.S. <
dougherty.greg...@mayo.edu> wrote:
>
>
> Yes, we do, because, well, it is more informative. :-)
>
> if (a) Š
> else if (b) Š
> else if (c) Š
>
> Says you have three mutually exclusive options, and implies that a is more
> likely / more
On 25.04.2016 17:21, Dougherty, Gregory T., M.S. wrote:
On 4/25/16, 9:38 AM, "Leon Rosenberg" wrote:
The other thing that made me wonder is that most people on the list (or
all
except me) actually considered if-else-if-else more readable. It not only
creates a more complex structure (visually
On 4/25/16, 9:38 AM, "Leon Rosenberg" wrote:
>The other thing that made me wonder is that most people on the list (or
>all
>except me) actually considered if-else-if-else more readable. It not only
>creates a more complex structure (visually and syntactically (more
>letters)). But also the sema
On 25.04.2016 16:38, Leon Rosenberg wrote:
On Mon, Apr 25, 2016 at 4:13 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Leon,
On 4/22/16 12:24 PM, Leon Rosenberg wrote:
Hi guys,
I would always choose the case with the elses.
Fi
On 4/25/2016 10:38 AM, Leon Rosenberg wrote:
On Mon, Apr 25, 2016 at 4:13 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Leon,
On 4/22/16 12:24 PM, Leon Rosenberg wrote:
Hi guys,
I would always choose the case with the elses.
On Mon, Apr 25, 2016 at 4:13 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Leon,
>
> On 4/22/16 12:24 PM, Leon Rosenberg wrote:
> > Hi guys,
> >
>
> I would always choose the case with the elses.
>
> First, I think it's more cl
> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> Subject: Re: OT if/else or not if/else
> > Actually, a good compiler should generate the same code for switch
> > and if ... else if, assuming the boolean expressions used with the
> > ifs are compatib
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Chuck,
On 4/22/16 12:54 PM, Caldarale, Charles R wrote:
>> From: David kerber [mailto:dcker...@verizon.net] Subject: Re: OT
>> if/else or not if/else
>
>> But I would add that if the conditions can be reduced to
>> enum
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Leon,
On 4/22/16 12:24 PM, Leon Rosenberg wrote:
> Hi guys,
>
> this is completely off-topic ;-)
>
> I was wondering if using if/else is not actually slowing down your
> code. Lets say I have three possible conditions, A, B and C, which
> are exclus
Am 23.04.2016 um 12:19 schrieb André Warnier (tomcat):
> Since it is still week-end..
>
> On 22.04.2016 21:57, Olaf Kock wrote:
>> Optimize for the maintainer, not for the compiler. The maintainer might
>> buy you a beer, the compiler for sure will not.
>
> With permission, I will borrow that par
Since it is still week-end..
On 22.04.2016 21:57, Olaf Kock wrote:
Optimize for the maintainer, not for the compiler. The maintainer might
buy you a beer, the compiler for sure will not.
With permission, I will borrow that paragraph for my upcoming "Programming for
Dummies" book.
This is pro
if else i prefer. Multiple ifs sounds like a political programming and you
are not sure what you are doing.
22 Nisan 2016 Cuma tarihinde, Leon Rosenberg
yazdı:
> Hi guys,
>
> this is completely off-topic ;-)
>
> I was wondering if using if/else is not actually slowing down your code.
> Lets say
Am 22.04.2016 um 18:24 schrieb Leon Rosenberg:
> Hi guys,
>
> this is completely off-topic ;-)
>
> I was wondering if using if/else is not actually slowing down your code.
> Lets say I have three possible conditions, A, B and C, which are exclusive.
> My native approach would be:
> if (A){...}
>
On Fri, 2016-04-22 at 17:34 +0100, Mark Thomas wrote:
> On 22/04/2016 17:24, Leon Rosenberg wrote:
> > Lets say I have three possible conditions, A, B and C, which are exclusive.
> > My native approach would be:
> > if (A){...}
> > if (B){...}
> > if (C){...}
> >
> > now some people would 'optimiz
> From: Leon Rosenberg [mailto:rosenberg.l...@gmail.com]
> Subject: OT if/else or not if/else
> I was wondering if using if/else is not actually slowing down your code.
> Lets say I have three possible conditions, A, B and C, which are exclusive.
> My native approach would be:
>
> From: David kerber [mailto:dcker...@verizon.net]
> Subject: Re: OT if/else or not if/else
> But I would add that if the conditions can be reduced to enumerations, a
> Switch would be even faster.
Actually, a good compiler should generate the same code for switch and if ...
else
On 4/22/2016 12:34 PM, Mark Thomas wrote:
On 22/04/2016 17:24, Leon Rosenberg wrote:
Hi guys,
this is completely off-topic ;-)
Excellent. An almost perfect Friday afternoon distraction. You just
needed some decent troll bait to make it perfect. ;)
I was wondering if using if/else is not act
But what is now, given that compilers can optimize stuff like this and tell
the processor to calculate all 3 branches simultaneously, which is not
possible for ifelse.
Which one would you choose?
Equally important, which one do you think is more readable? I would say if
else is hard to read, but
On 22/04/2016 17:24, Leon Rosenberg wrote:
> Hi guys,
>
> this is completely off-topic ;-)
Excellent. An almost perfect Friday afternoon distraction. You just
needed some decent troll bait to make it perfect. ;)
> I was wondering if using if/else is not actually slowing down your code.
> Lets sa
Hi guys,
this is completely off-topic ;-)
I was wondering if using if/else is not actually slowing down your code.
Lets say I have three possible conditions, A, B and C, which are exclusive.
My native approach would be:
if (A){...}
if (B){...}
if (C){...}
now some people would 'optimize' it as
i
27 matches
Mail list logo