discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] Inefficiency of message passing in inband code


From: Stefan Brüns
Subject: [Discuss-gnuradio] Inefficiency of message passing in inband code
Date: Thu, 09 Oct 2008 21:26:47 +0200
User-agent: KMail/1.9.9

Hi,

I ran some performance analysis of the inband code, and found the pmt based 
message passing as highly inefficient.

As a first step, I changed the pmt_list[1-6] implementations from using an 
imbalanced tree with refcounted pairs against a much more simple pmt_vector 
based one, resulting in a huge speedup.

Unfortunately, this means going from ~770 instructions per sample [1] to ~300 
instructions per sample, which is still just to much.

The high cost is due to the following reasons:
On each received sample block, the data is passed between the mblocks. For 
this, messages are created, every fields refcount gets incremented, on 
message reception the fields refcounts are adjusted again, and when the 
receiving block finishes, the fields refcounts and the messages refcount are 
decreased, leading to release of the fields and the message (as the receiving 
block is normally the only block holding a reference to the message).

Much of this work is just not necessary - I think the messages should be much 
more statically typed, using refcounted objects only for large objects (e.g, 
pass the sample data as refcounted object, the package length as a POD).

Any opions on this topic?

Stefan

-- 
Stefan Brüns  /  Bergstraße 21  /  52062 Aachen
mailto:lurch at gmx.li  http://www.kawo1.rwth-aachen.de/~lurchi/
   phone: +49 241 53809034     mobile: +49 151 50412019




reply via email to

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