Article View: comp.bugs.4bsd
Article #227Re: Bug in users command
From: Dan Bernstein
Date: Sat, 19 Jan 1991 16:41
Date: Sat, 19 Jan 1991 16:41
18 lines
1302 bytes
1302 bytes
In article <14902@celit.fps.com> billd@fps.com (Bill Davidson) writes:
> #!/bin/sh
> USERS=`who|sort|awk '{print $1}'`
> echo $USERS
Okay, timings: The perl version is about ten times as slow as the PD C
version and the Berkeley C version. The shell script is about twice as
slow as that. The perl version uses ten times as much memory as the C
versions, and five times as much memory as the shell script.
Now can someone give me one good reason that Berkeley should distribute
the Perl or sh version rather than the C version? 30 lines of C code is
hardly a maintenance problem, and on a system with fifty undergraduates
running automatic utmp checks every minute in the background, the
difference between C and Perl is the difference between a 2% extra load
and a 20% extra load.
---Dan
Technical Details
Message-ID:
<19095:Jan1916:41:3291@kramden.acf.nyu.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!samsung!usc!snorkelwacker.mit.edu!hsdndev!cmcl2!kramden.acf.nyu.edu!brnstndReferences:
<1126:Jan1811:17:4091@kramden.acf.nyu.edu> <11104@jpl-devvax.JPL.NASA.GOV> <14902@celit.fps.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!samsung!usc!snorkelwacker.mit.edu!hsdndev!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.bugs.4bsd Subject: Re: Bug in users command Message-ID: <19095:Jan1916:41:3291@kramden.acf.nyu.edu> Date: 19 Jan 91 16:41:32 GMT References: <1126:Jan1811:17:4091@kramden.acf.nyu.edu> <11104@jpl-devvax.JPL.NASA.GOV> <14902@celit.fps.com> Organization: IR Lines: 18