chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] advice about hash tables


From: Claude Marinier
Subject: [Chicken-users] advice about hash tables
Date: Wed, 21 Nov 2012 12:52:02 -0500

Hi,

I am relatively new to Scheme, i.e. this is my first significant program. The program uses a few hash tables; some use a four element u8 vector as the key and others use an eight element u16 vector (yes, they are IP addresses). It seems to work but, when dumping the tables, I noticed multiple (two or three) entries for some IPv4 addresses.

I have some questions.

 - Is this expected to work?

 - Am I doing something off the beaten path?

 - How is the hash function's length parameter calculated?

 - Could the hash function be looking beyond the end of the vector?

At this point, I am not sure how to approach debugging. I have created a small test program but it just works. Recreating this may be difficult. I will gratefully consider your suggestions.

-------

I am using Chicken Scheme 4.8.0 on Debian Squeeze (i686). The program uses the following packages.

    (require-extension numbers extras posix srfi-13 srfi-14 srfi-69 FNVAHash hash-utils)

If you want to look at the code, google this.

    sourceforge hostipstats

The main is accmlr.scm; the next phase of the project will be a user interface to view the data.

Merci.

P.S. I do not monitor this e-mail account every day.

--
Claude Marinier


reply via email to

[Prev in Thread] Current Thread [Next in Thread]