On 2012/08/31 10:20:04, Graham Percival wrote:
http://codereview.appspot.com/6496067/diff/1/lily/include/skyline.hh
File lily/include/skyline.hh (right):


http://codereview.appspot.com/6496067/diff/1/lily/include/skyline.hh#newcode42
lily/include/skyline.hh:42: inline Real start () const { return
start_; };
hmm... I personally would call that
   get_start()
since I would expect
   start()
to begin some process inside the object.  (i.e. timer.start() )

http://codereview.appspot.com/6496067/diff/1/lily/skyline.cc
File lily/skyline.cc (right):


http://codereview.appspot.com/6496067/diff/1/lily/skyline.cc#newcode221
lily/skyline.cc:221: while (!s->empty () && start_x < b.end ())
is there any performance penalty for using a function call instead of
a value
directly?  or does the C++ compiler optimize those out (especially
since they're
const ?) ?

C++ compilers are expected to optimize most of those out in order not to
taint the reputation of the language's performance all too much.

GCC does this successfully enough that you can't even use most of those
functions in the debugger because no actually callable instance of the
code has been left in place.  Quite a nuisance in debugging.

http://codereview.appspot.com/6496067/

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to