[comp.lang.perl] Perl-Users Digest #595

emv@ox.com (Ed Vielmetti) (02/04/91)

In article <1991Feb4.012922.7962@uvaarpa.Virginia.EDU> eichin@athena.mit.edu (Mark W. Eichin) writes:

   look at the latest Usenix proceedings - "A New
   Hashing Package for UNIX", Margo Seltzer (UCB) and Ozan Yigit (York
   U.) p. 173, USENIX Winter '91. It's fast and machine independent (the
   disk files can be read on any machine, whereas dbm indices are not
   portable; the files tend to be smaller, or at least have fewer
   "holes"; and it's typically faster than dbm and *much* faster than GNU
   dbm.) 

The new hashing package has not been released yet, as far as I know.

But might do you well to pick up Oz's slightly older "sdbm" package;
it should do you better than ndbm, and there are enough things tunable
about it to let you experiment.  A perl built with it won't read old
dbm files though...

Here's a pointers to sdbm

Archive: decuac.dec.com:/public/sources/sdbm.shar.Z [16.67.32.1]
Archive: tut.cis.ohio-state.edu:/pub/sdbm/sdbm.Z [128.146.8.60]

and part of the release announcement:

From: oz@nexus.YorkU.CA (Ozan Yigit)
Subject: sdbm is available.
Keywords: dbm,ndbm,sdbm
Date: 15 Dec 90 22:02:21 GMT

A complete clone of Berkeley's ndbm, called sdbm is available.
It is currently ftp-able from nexus.yorku.ca [130.63.9.1] as
pub/oz/sdbm.shar.Z.

points of interest:

+ A complete functional clone of ndbm, using a fast and simple external
  hashing algorithm: "Dynamic Hashing" (1978) by P.-A. Larson.

+ sdbm is fully public domain. There is no pedantic, overbearing or
  infectious copyright/left to put up with. It is unconditionally yours,
  and everybody-else's. You can do whatever you like with it.

+ sdbm is faster and safer than ndbm, but shares the same shortcomings:
  limited size records, holes. On the other hand, ndbm needs no apologies:
  it has proven itself to be extremely useful within its limitations. The
  sdbm pagefiles are smaller than ndbm, and contain fewer holes.

clewis@ferret.ocunix.on.ca (Chris Lewis) (02/05/91)

In article <EMV.91Feb3231935@crane.aa.ox.com> emv@ox.com (Ed Vielmetti) writes:
!In article <1991Feb4.012922.7962@uvaarpa.Virginia.EDU> eichin@athena.mit.edu (Mark W. Eichin) writes:

!   look at the latest Usenix proceedings - "A New
!   Hashing Package for UNIX", Margo Seltzer (UCB) and Ozan Yigit (York
!   U.) p. 173, USENIX Winter '91. It's fast and machine independent (the
!   disk files can be read on any machine, whereas dbm indices are not
!   portable; the files tend to be smaller, or at least have fewer
!   "holes"; and it's typically faster than dbm and *much* faster than GNU
!   dbm.) 

!The new hashing package has not been released yet, as far as I know.

!But might do you well to pick up Oz's slightly older "sdbm" package;
!it should do you better than ndbm, and there are enough things tunable
!about it to let you experiment.  A perl built with it won't read old
!dbm files though...

FYI: we're running an Alpha copy of a later version of sdbm than the
posted ones, and it seems to perform quite well.  Even when
integrated into Perl.  A colleague has posted a program to convert
dbm files to sdbm.
-- 
Chris Lewis, Phone: (613) 832-0541, Internet: clewis@ferret.ocunix.on.ca
UUCP: uunet!mitel!cunews!latour!ecicrl!clewis
Moderator of the Ferret Mailing List (ferret-request@eci386)
Psroff enquiries: psroff-request@eci386, current patchlevel is *7*.