Path: utzoo!utgpu!watmath!clyde!mcdchg!chinet!att!osu-cis!tut.cis.ohio-state.edu!rutgers!bellcore!faline!thumper!ulysses!andante!alice!bs From: bs@alice.UUCP (Bjarne Stroustrup) Newsgroups: comp.lang.c++ Subject: Re: C++ : A free lunch ? Summary: can be BETTER than a free lunch Message-ID: <8371@alice.UUCP> Date: 29 Oct 88 14:37:47 GMT References: <4165@tekgvs.GVS.TEK.COM> Organization: AT&T Bell Laboratories, Murray Hill NJ Lines: 20 tekcrl.TEK.COM writes > in order to make best use of its object-oriented features you should count on > the run-time overhead that virtual functions, constructors, and destructors > impose. However, this ``overhead'' may actually not be ``overhead'' compared with the code you have to write in a traditional C program doing a similar job: See Vince Russo's paper about a Scheme interpreter written in C and then rewritten in C++ using a basic object-oriented style. The rewrite was done because of a bet that ``C++ with an OO style isn't much slower than C''. Russo won: the C++ program consistently ran faster. I especially enjoyed Russo's comments that ``it was easy to see how to improve the algorithms to make the progem run MUCH faster, but we didn't do that because that would have been cheating'' (or words to that effect). The paper can be found in the proceedings of the Denver USENIX C++ conference.