www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/21/11:38:28

Sender: jottingr AT freenet DOT scri DOT fsu DOT edu
Message-ID: <335B8491.167E@notepad.com>
Date: Mon, 21 Apr 1997 11:15:29 -0400
From: "Joseph B. Ottinger" <joeo AT notepad DOT com>
Organization: http://www.freenet.tlh.fl.us/~joeo
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: Style AND speed in C++? How? Please, I need some radical ideas on this one!
References: <c=GB%a=_%p=Indigo_Active_Vi%l=CRIANLARICH-970421130655Z-367 AT crianlarich DOT Indigo>

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.

-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/MU/P d? s+:--- a- C++$ UL++>++++ UA++$ P L++>+++ E W++(--) N+ o! K
w++(---) O M-- V(-) PS+ PE++ Y+ PGP- t+ 5+ X-- R+++ tv+ b+++ DI++ D++ G
e>+++ h----(--) r+++ y?
------END GEEK CODE BLOCK------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019