Message-ID: From: Robert Humphris To: "'djgpp AT delorie DOT com'" , "'Joseph B. Ottinger'" Subject: RE: Style AND speed in C++? How? Please, I need some radical ideas on this one! Date: Tue, 22 Apr 1997 11:56:31 +0100 Encoding: 33 TEXT Precedence: bulk >---------- >From: Joseph B. Ottinger[SMTP:joeo AT notepad DOT com] >Sent: 21 April 1997 16:15 >To: djgpp AT delorie DOT com >Subject: Re: Style AND speed in C++? How? Please, I need some radical >ideas on this one! > >Robert Humphris wrote: >> >> How about using a parent class, and having all drivers for new cards >> etc. as children of that class. > >Possibly a decent idea. > >The only problem is the use of virtual functions. I don't know >specifically about DJGPP, but vtabs usually have a little bit of >overhead associated with them. Why not use function pointers, >initialised by the specific constructors? It's still not *quite* as fast >a specific call, but there might be a way around that, too. Yes that is quite possible, but doesn't the optimization take this into account? Once this is all compiled surely the actual pointer type difference ceases to matter? Tell me if I am wrong, as although ignorance may be bliss, its very annoying when you start propagating it! > Rob Humphris