Sign in Join
Wiki copytemporary

StringHashMap

About

StringHashMap is a string -> pointer associative map container. It is implemented in a fast and memory efficient way. The search time of a hash map is constant, it does not depend on the amount of data (assuming there is enough memory and no swapping). Millions of elements is no problem.

The unit name is StrHashMap.pas and it was modified from unit JclStrHashMap.pas which is part of Jcl library.

The purpose was to make it compile and work with FPC (Free Pascal Compiler). In the process lots of code with conditional compilation directives was removed and also many unit dependencies were removed.

The download contains:

Author

Juha Manninen <juha dot manninen (at) phnet dot fi>

+ the original authors of Jcl code.

License

This code is licensed under the same terms as Jcl library.

Download

The latest stable release can be found on GitHub: http://github.com/JuhaManninen/Pascal

There is a "Download Source" button available.

Change Log

Dependencies / System Requirements

Status: Stable

Issues: It turned out there are about similar container classes in FPC's libraries so this one is not published in CCR. I published it in GitHub instead.

Installation

Just include unit StrHashMap in the "uses" section. Set path for it in project settings if needed.

The HashMapDemo1 Example Application

To install and run:

The example application first builds a database of South Park episodes and then demonstrates the following features of StringHashMap:

See also


From the Free Pascal wiki, page "StringHashMap", as it stood on 2018-08-01 after a change by Serbod, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 1, last changed by WikiArchive .

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.