[PATCH 2/2] Avoid copy constructor in uplink tbf path

Harald Welte laforge at gnumonks.org
Wed Mar 23 10:46:55 UTC 2016

Dear all,

as a general rule, I suggest to refrain from optimizations, unless

a) a performance issue is immediately obvious, or

b) there is actual profiling showing an improvement comparing
   before/after, or at least showing that the existing code is a CPU

Everything else is - with all respect - likely to waste time of everyone
involved in preparing the patch, reviewing it, discussing it, etc.

To say it with Donald Knuth:
"Premature optimization is the root of all evil"

Now that of course is no excuse from writing unneccesarily bloated or
inefficient code in the first place, but we generally try to keep things

Also, keep in mind that a PCU in 1999/2000 had to run on incredibly
small and inefficient hardware, while today I think the smallest system
is the sysmoBTS 1002 on an ARM926EJS processor at 405 MHz.  And it only
has a single TRX at that.

All other systems it runs on have much faster CPU, memory bandwidth, RAM
size.... so let's focus on improving the code functionality and
completeness before optimizing things that are not even proven issues in
the real world


- Harald Welte <laforge at gnumonks.org>           http://laforge.gnumonks.org/
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)

More information about the osmocom-net-gprs mailing list