From owner-freebsd-current Sun Jan 24 15:56:11 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA08846 for freebsd-current-outgoing; Sun, 24 Jan 1999 15:56:11 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA08839 for ; Sun, 24 Jan 1999 15:56:10 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.2/8.9.1) id PAA05605; Sun, 24 Jan 1999 15:55:50 -0800 (PST) (envelope-from dillon) Date: Sun, 24 Jan 1999 15:55:50 -0800 (PST) From: Matthew Dillon Message-Id: <199901242355.PAA05605@apollo.backplane.com> To: Mikhail Teterin Cc: current@FreeBSD.ORG Subject: Re: sysctl oids (was: Re: kvm question) References: <199901242340.SAA04694@kot.ne.mediaone.net> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :Seldom. But the strings are still in the kernel, which becomes :bigger with every build. My argument was more general, however, :and directed against the growing tendency to use string literal :(and copy them beck and forth). IMHO, the point of faster hardware :is purely to have thing running faster, rather then letting :programmers be "sloppier". : :However, as I already stated, this is just my preference. : : -mi You are operating under the assumption that the strings somehow take a huge amount of space compared to an int and the rest of the sysctl structure. This couldn't be farther from the truth. apollo:/usr/src/sys# sysctl -A | awk '{ print $1; }' | sed -e 's/://' | wc 384 382 7555 8K. Not a big deal. And this doesn't even include filtering out the prefixes which I'm duplicate-counting all over the place. The equivalent 'integer' form, judging by the average length of the postfix string, would still eat 3K, so we'd only be saving 5K. Strings are a whole lot more portable then integer assignments. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message