On Sat, 2007-08-25 at 17:38 +1200, David McNab wrote: > On Sat, 2007-08-25 at 10:41 +0800, Martin Ellison wrote: > > But anyway, what is wrong with switches? > > You find out soon enough if you've got a big switch in a tight > time-critical loop.
You wouldn't create new objects in such a loop, anyway. You'd rather use either static objects or pre-created objects. So say you got a set of pointers to your pre-created objects. Those pointers being held in an array. There you'd have the speedy look up of the objects like you mentioned before. Those objects in turn could inherit a set of virtual methods. In your loop you just retrieve the object pointer and access the object's virtual methods which would be speedy, too. The advantage is you'd just handle one pointer table for your objects instead of several pointer tables for several functions. Let the compiler to the work instead. Yours sincerely, Dennis Schulmeister -- Dennis Schulmeister - Schliffkopfweg 12 - 76189 Karlsruhe - Germany Tel: +49 721/5978883 - Fax: +49 721/5705992 - [EMAIL PROTECTED] Fresh from the laundry: Hermes! (http://ncc-1701a.homelinux.net) (mostly German) http://www.windows3.de - http://www.denchris.de http://www.audiominds.com - http://www.motagator.net/bands/65 _______________________________________________ Cinelerra mailing list [email protected] https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
