473,388 Members | 1,109 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Looking for a hash package

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
Nov 13 '05 #1
2 2027

"Ramon F Herrera" <ra***@conexus.net> wrote in message
news:c9*************************@posting.google.co 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


Nov 13 '05 #2
am**@conexus.net (Ramon F Herrera) wrote in message news:<c9bc36ff.0307112300.d6
fa***@posting.google.com>...
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 bo****@sleepycat.com
Sleepycat Software Inc. keithbosticim (ymsgid)
118 Tower Rd. +1-781-259-3139
Lincoln, MA 01773 http://www.sleepycat.com
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Christopher | last post by:
I have a hash that is several levels deep. ie: 'vars' => { '$filers' => '10.10.10.10/32', '$networksa' => '10.10.10.10/32', '$networksb' => '10.50.0.0/16', '$wintel_boxes' =>...
2
by: scadav | last post by:
I am new to Perl and I am trying for figure out how to solve this problem. If anyone can give me some suggestions, I would greatly appreciate it. I am trying to read a log file and generate...
1
by: Norman Ackroyd | last post by:
Ok, so I'm working on a Perl proggy to convert Net.Data to JSP (gotta love Perl.) I've got a Module that has a Class to store all relevant information about a Net.Data user defined function that is...
8
by: Michael B Allen | last post by:
I would like to know your preferences regarding a C API for a hash map. Specifically, when inserting a data item into a hash map there are two special cases that require consideration. 1) If two...
4
by: Thomas Christmann | last post by:
Hi! First let me apologize for asking this question when there are so many answers to it on Google, but most of them are really contradicting, and making what I want to do very performant is...
1
by: mirandacascade | last post by:
I am attempting to implement a process, and I'm pretty sure that a major roadblock is that I do not understand the nomenclature. The specs indicate that the goal is to calculate a message digest...
139
by: ravi | last post by:
Hi can anybody tell me that which ds will be best suited to implement a hash table in C/C++ thanx. in advanced
2
by: raknin | last post by:
Hi, I am looking for a close package of secure login and registeration written in PHP.The package that I am looking for should have the following functionality I believe this is standard...
24
by: Alexander Mahone | last post by:
Hello, I'm looking for an hash function to be used for an hash table that will contain structs of a certain kind. I've looked into Sourceforge.net, but so far I've found only hash functions for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.