lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix uninitialized variables when Source_file::get_counts returns ear


From: David Kastrup
Subject: Re: Fix uninitialized variables when Source_file::get_counts returns early due to !contains (pos_str0) (issue 4940047)
Date: Wed, 24 Aug 2011 15:25:33 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Dan Eble <address@hidden> writes:

> There can be a run-time performance difference between branching or
> not branching.  For the times you actually care, if you're not going
> to use compiler-specific features to mark conditions as likely or
> unlikely, you should test the likely case first so that there is no
> branching most of the time.

Modern compilers pay very little attention to how you arrange the source
code of equivalent constructs.

> You can also write functions that are equally difficult to read with
> both.

No.  Humans begin reading at the beginning and go forward from there.
There is a difference between having one case dealt with completely, and
having to keep it in mind while reading something else.

Basically you are saying "juggling with one ball can be equally
difficult to juggling with two" and conclude from that dubious premise
that juggling any number of balls is equally hard.

-- 
David Kastrup




reply via email to

[Prev in Thread] Current Thread [Next in Thread]