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

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/osmocom-net-gprs@lists.osmocom.org/.

Holger Freyther holger at freyther.de
Tue Mar 22 20:26:49 UTC 2016


> On 22 Mar 2016, at 14:12, Bhargava Abhyankar <Bhargava.Abhyankar at radisys.com> wrote:
> 
> The copy constructor of GprsCodingScheme class object used in
> uplink tbf path is replaced by the reference variable.
> Appropriate function prototypes and function definition are
> changed.

yes, it is good style to mark them as const (and pass them as reference).


> This patch will increase efficiency of the code.

Given the size of the member and that the constructor is inlined my first assumption is that for this specific type the runtime cost of copying m_scheme and a pointer will be about the same.


kind regards
	holger


More information about the osmocom-net-gprs mailing list