Date: Fri, 28 Jul 2000 14:51:00 -0700 (PDT) From: Archie Cobbs <archie@whistle.com> To: FengYue <fengyue@bluerose.windmoon.nu> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: a quick one Message-ID: <200007282151.OAA27665@bubba.whistle.com> In-Reply-To: <Pine.BSF.4.10.10007281459090.14780-100000@bluerose.windmoon.nu> from FengYue at "Jul 28, 2000 03:00:39 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
FengYue writes: > Hi there, a quick one. Is getpeername() considered expensive? > Would it be much better if I cache the result myself instead of > calling it everytime on the connected socket(returned from accept) to > find out which IP it connects to? It's not particularly expensive compared to other system calls.. but if you find system calls in general expensive, then it would certainly count as one :-) I'd say it's unlikely that this kind of optimization would be worth the trouble for a 'normal' application. -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200007282151.OAA27665>