plugins/queue: Use previous knowledge of data type to avoid typecheck.
authorEdward Hervey <bilboed@bilboed.com>
Mon, 28 Sep 2009 13:41:52 +0000 (15:41 +0200)
committerEdward Hervey <bilboed@bilboed.com>
Wed, 7 Oct 2009 07:15:13 +0000 (09:15 +0200)
commitd28a3e743502d64c2a96bdb637043d6df0589009
treef175a482fdc25681a848bdebe8a8ae0031466be7
parent9be7fdc8574724d8a2ec3f24cd24adde82de2414
plugins/queue: Use previous knowledge of data type to avoid typecheck.

We know whether we have a buffer or an event, use that instead of going
trough the expensive GLib typecheck.

The overall instruction fetch reduction introduced by this commit and the
2 previous commits:
* receiving a buffer (_chain) by 20%
* popping a buffer (_loop) by 14%

Numbers acquired through callgrind passing 100000 buffers through queue.
plugins/elements/gstqueue.c