Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Looking for a hash package

Reply
Thread Tools

Looking for a hash package

 
 
Ramon F Herrera
Guest
Posts: n/a
 
      07-12-2003
Hello:

Is there some C hash package out there?

I am a big fan of the Berkeley DB, which has
outstanding performance, but it is (I think) restricted
to disk operations, while I would like to keep my data in RAM.
I need some sort of Perl-like relational arrays, but in C.

TIA,

-Ramon F. Herrera
 
Reply With Quote
 
 
 
 
Glen Herrmannsfeldt
Guest
Posts: n/a
 
      07-12-2003

"Ramon F Herrera" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) m...
> Hello:
>
> Is there some C hash package out there?
>
> I am a big fan of the Berkeley DB, which has
> outstanding performance, but it is (I think) restricted
> to disk operations, while I would like to keep my data in RAM.
> I need some sort of Perl-like relational arrays, but in C.


The hsearch() package is included in many unix systems, and should be
available in source form from an open source unix implementation.

Though it has the disadvantage that you can only have one, as the hash table
is global.

-- glen




 
Reply With Quote
 
 
 
 
Keith Bostic
Guest
Posts: n/a
 
      07-12-2003
http://www.velocityreviews.com/forums/(E-Mail Removed) (Ramon F Herrera) wrote in message news:<c9bc36ff.0307112300.d6
(E-Mail Removed)>...
> Hello:
>
> Is there some C hash package out there?
>
> I am a big fan of the Berkeley DB, which has
> outstanding performance, but it is (I think) restricted
> to disk operations, while I would like to keep my data in RAM.
> I need some sort of Perl-like relational arrays, but in C.


If you don't specify a physical file name to the Berkeley DB
Db.open method, DB will create an in-memory database. The
contents of an in-memory database are not preserved on disk.

Berkeley DB won't write the contents of any database to disk
unless the data won't fit in the cache, that is, all data is
be held in RAM until there is no longer sufficient RAM to hold
the data. In the case of in-memory databases, running out of
RAM usually implies the creation of a temporary backing files.

In the upcoming Berkeley DB 4.2.XX release, applications can
specify a maximum size for a database, and also that DB fail
operations rather than opening backing temporary files for
in-memory databases.

While there are interesting algorithms for pure in-memory
databases, a cache in front of a traditional disk-based
database is usually fine from a performance standpoint.

Regards,
--keith

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Keith Bostic (E-Mail Removed)
Sleepycat Software Inc. keithbosticim (ymsgid)
118 Tower Rd. +1-781-259-3139
Lincoln, MA 01773 http://www.sleepycat.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
hash of hash of hash of hash in c++ rp C++ 1 11-10-2011 04:45 PM
Hash#select returns an array but Hash#reject returns a hash... Srijayanth Sridhar Ruby 19 07-02-2008 12:49 PM
single package import v/s the entire package Parvinder Java 6 02-27-2005 02:02 PM
package module import name clash with global package George P Python 3 09-11-2004 01:19 PM
Importing a package and looping through modules in the package Dave Python 2 02-10-2004 08:14 PM



Advertisments