Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!hplabs!hp-pcd!hplsla!jima From: jima@hplsla.HP.COM (Jim Adcock) Newsgroups: comp.lang.c++ Subject: Re: Having constructors is expensive. Message-ID: <6590140@hplsla.HP.COM> Date: 5 Jun 89 17:50:24 GMT References: Organization: HP Lake Stevens, WA Lines: 9 > For example, why couldn't a compiler pass a null > function pointer to the vector new function, test in the vector new function > whether or not to call that function, and then generate an inline for-loop > with the inline X() constuctor to do the actual init? Good optimizing > backend C "code generators" would be smart enough to void the loop if the > X() constructor is null. Alternately, one could at least hope that a compiler would recognize a null initialize, and just pass a null function pointer to the vector new function.