Date: Sat, 6 Mar 2004 11:25:47 +0000 From: Daniela <dgw@liwest.at> To: Rahul Siddharthan <rsidd@online.fr>, Chris Pressey <cpressey@catseye.mine.nu> Cc: chat@freebsd.org Subject: Re: FreeBSD Most wanted Message-ID: <200403061125.47751.dgw@liwest.at> In-Reply-To: <20040306031954.GA3713@online.fr> References: <20040306012556.GA2554@online.fr> <20040305192200.7a377e92.cpressey@catseye.mine.nu> <20040306031954.GA3713@online.fr>
next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday 06 March 2004 03:19, Rahul Siddharthan wrote: > Chris Pressey said on Mar 5, 2004 at 19:22:00: > > On Sat, 6 Mar 2004 02:55:35 +0100 > > > > Rahul Siddharthan <rsidd@online.fr> wrote: > > > Daniela wrote: > > > > I like doing AI programming, that's numbercrunching most of the time. > > > > > > > > A compiler can't, for example, know whether you need to have zero > > > > returned from the atoi() function when the user entered nonsense. If > > > > you don't need to check whether the user has entered a valid number, > > > > you can do it *much* faster. > > > > > > Excellent example. Here you're limited by the speed of the fingers of > > > the user who's entering the data, so there's *absolutely no point* in > > > optimising the atoi() function in this way. (Or if you're reading from > > > the disk, the disk I/O will be the bottleneck, though it's admittedly > > > faster than fingers.) > > > > I don't understand your point... atoi() is not an I/O function. > > Where did the "a" in the "atoi" come from? > > The point is that some very slow i/o routine gives you an ascii string > (that's the only reason you'd ever need to deal with an ascii string), > and then the C library's atoi() converts that to an integer. Now, > what's the advantage of optimising atoi()? It was just an example.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403061125.47751.dgw>