[gst-cvs] gstreamer omegahacker

Erik Walthinsen omegahacker at users.sourceforge.net
Wed Nov 29 02:05:48 PST 2000


CVSROOT:	/cvsroot/gstreamer
Module name:	gstreamer
Changes by:	omegahacker	00/11/29 02:05:48

Modified files:
	gst            : cothreads.c 

Log message:
Rearranged cothread_switch a bit to move all the code for error conditions
to the end, using goto's to get there.  This has the presumed advantage of
consolidating all the normally run code into one chunk, reducing jumps
(and the associated penalties in any modern processor) and limiting cache-
line usage.  It may be instructive to look at the generated assembly for
this revision and the previous, to see if gcc is smart enough to do this
for us anyway.

If you want to turn off some of the checks (they are all checks for NULL
pointers, if you're curious) for a speed gain, disable the #define of
COTHREAD_PARANOID at the top.




More information about the Gstreamer-commits mailing list