[JaxPM] computing values vs. storing as hash

Nate Campi nate at campin.net
Wed Jan 2 02:10:00 CST 2002


On the jacksonville-pm-list; Jax.PM'er Nate Campi <nate at campin.net> wrote -

I'm playing with a syslog relaying perl script I threw together while
debugging some third party software at work. I'm actually going to make
it compliant with RFC 3164 (http://www.ietf.org/rfc/rfc3164.txt) as a
programming exercise.

The pattern matching and substition stuff is all going quite quickly, but
I was wondering (more academically than anything else), whether I should
store the mapping of priority values to facility/severity strings as
hash or compute them on the fly.

I tend to think I should build up a big hash with all the mappings
pre-computed for speed. Do people stick to that as a rule (where
possible), or what?

OBTW, I just ditched procmail and went to Mail::Audit for mail filtering 
and delivery. Man it's nice.

 http://www.perl.com/lpt/a/2001/07/17/mailfiltering.html)
-- 
Nate Campi     http://www.campin.net    GnuPG key: 0xC17AEF79   

I have never left my schooling interfere with my education. - Mark Twain


Jax.PM Moderator's Note:
This message was posted to the Jacksonville Perl Monger's Group listserv.
The group manager can be reached at -- owner-jacksonville-pm-list at pm.org
to whom send all praises, complaints, or comments...




More information about the Jacksonville-pm mailing list