Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!genrad!panda!talcott!harvard!seismo!rochester!ritcv!ccivax!rb@ccivax From: rb@ccivax Newsgroups: net.lang.c Subject: Re: fast code and no morals Message-ID: <355@ccivax.UUCP> Date: Fri, 24-Jan-86 19:06:53 EST Article-I.D.: ccivax.355 Posted: Fri Jan 24 19:06:53 1986 Date-Received: Thu, 30-Jan-86 01:10:53 EST References: <842@megaron.UUCP> <1820@brl-tgr.ARPA> Sender: guest@ccivax.UUCP Distribution: net Organization: CCI Telephony Systems Group, Rochester NY Lines: 22 > > Here's a version of calloc that breaks every rule of "structured" > > programming ever invented -- and runs about twice as fast as a > > vanilla version: > > /* C code deleted to reduce traffic */ > > > > So what? This can be written "structured", and would be more > maintainable if it were. Surely this is not an example of > recommended practice? True, that code was not what I would call a "Model for maintainability", but when time or memory is limited (Try letting an RS-232 96kb link do calloc when there's little or no flow control) maintainability is a secondary issue (Who said that!!! :) ). I would be interested in other examples of this type (like a real fast version of "bcopy", or "bzero" ) even if it looked like chinese!!! There are times when you need speed more than structure! Anybody got a real fast copy example that can copy 97 bytes from an odd address in less than 5 microseconds :) ?