discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Small cleanups for inband code


From: Stefan Bruens
Subject: Re: [Discuss-gnuradio] Small cleanups for inband code
Date: Wed, 28 Jan 2009 21:40:35 +0100
User-agent: KMail/1.11.0 (Linux/2.6.27.7-9-mtrr_san; KDE/4.2.0; x86_64; ; )

One more: This time, some changes for the uniform vectors (uv) of pmt. 

Rationale: std::vector<> always initializes memory.
First, for the uvs, uninitialized may be fine for many cases, otherwise, 
initialization should be requested explicitly.
Second, even for scalar types, initialization is expensive, as memset is only 
used for byte sized types, otherwise a for loop is used (even when setting to 
0).

This patch introduces a small helper class which substitutes std::vector for 
the uniform vectors.

This patch has no influence on ABI/API.

It saves about 20% of cycles for test_usrp_inband_tx. (Savings for *_rx are 
much smaller, as it only uses uv_u8, not uv_s16, but still significant)

Stefan 

-- 
Stefan Brüns  /  Bergstraße 21  /  52062 Aachen
phone: +49 241 53809034     mobile: +49 151 50412019

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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