{"id":16519115,"url":"https://github.com/pdebuyl/fortran_hash_table","last_synced_at":"2026-03-04T08:32:45.832Z","repository":{"id":151028034,"uuid":"125759686","full_name":"pdebuyl/fortran_hash_table","owner":"pdebuyl","description":"\"\u003cstring,string\u003e\" hash table in Fortran 2008","archived":false,"fork":false,"pushed_at":"2018-03-20T12:56:17.000Z","size":178,"stargazers_count":14,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-02T22:22:15.853Z","etag":null,"topics":["fortran","fortran2008","hashtable"],"latest_commit_sha":null,"homepage":"https://pdebuyl.github.io/fortran_hash_table/","language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pdebuyl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-03-18T19:23:56.000Z","updated_at":"2024-06-21T19:34:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"92ee3b40-22ae-4959-91e6-91a437d5957a","html_url":"https://github.com/pdebuyl/fortran_hash_table","commit_stats":{"total_commits":26,"total_committers":1,"mean_commits":26.0,"dds":0.0,"last_synced_commit":"a9d2c66d2688ee60ae8ff9db9d11960bb27f66bb"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pdebuyl/fortran_hash_table","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdebuyl%2Ffortran_hash_table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdebuyl%2Ffortran_hash_table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdebuyl%2Ffortran_hash_table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdebuyl%2Ffortran_hash_table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pdebuyl","download_url":"https://codeload.github.com/pdebuyl/fortran_hash_table/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdebuyl%2Ffortran_hash_table/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30076895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T08:01:56.766Z","status":"ssl_error","status_checked_at":"2026-03-04T08:00:42.919Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fortran","fortran2008","hashtable"],"created_at":"2024-10-11T16:45:16.571Z","updated_at":"2026-03-04T08:32:45.801Z","avatar_url":"https://github.com/pdebuyl.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fortran hash table {#mainpage}\n\nThe module `dictionary_m` implements a \"\u003cstring,string\u003e\" hash table based on the djb2 hash\nfunction.\n\n    program example_from_readme\n      use dictionary_m\n      implicit none\n\n      type(dictionary_t) :: d\n\n      call d%init(1024)\n\n      call d%set('one', 'one')\n      call d%set('pi', '3.14159')\n\n      write(*,*) 'one', ' = ', d%get('one')\n      write(*,*) 'pi', ' = ', d%get('pi')\n\n    end program example_from_readme\n\n\n**Author:** Pierre de Buyl\n\n**License:** BSD\n\n**Code repository:** [https://github.com/pdebuyl/fortran_hash_table/](https://github.com/pdebuyl/fortran_hash_table/)\n\n## Project goals\n\n- Demonstrate a hash table in Fortran.\n- Use standard Fortran 2008.\n- Single file implementation.\n- No dependency.\n- No preprocessing.\n- Not design a generic container, `dictionary_m` just stores strings. It is of course\n  possible to replace the \"value\" entry in the type `entry_t` for a single-datatype\n  dictionary.\n\n\nThe hash table is based on plain allocatable arrays and the base data is stored in `(len=:),\nallocatable` character variables. Buckets are extended arbitrarily by reallocation, thus\ncollisions will slow down this implementation with respect to others using better data\nstructures.\n\nThe goal is not to beat other implementations performance-wise but to provide the\nconvenience for Fortran programmers to store configuration settings, or other auxiliary data\neasily.\n\n\n## Installation\n\n`dictionary_m` consists of a single Fortran file. You can just drop `src/dictionary_m.f90`\nin your Fortran project.\n\nThe code requires Fortran 2008 support. For gfortran, I have tested version 6.3 and 7.2. For\nIntel Fortran, I have tested version 16.0.3.\n\n## Documentation and coverage\n\nIf you read this page from the \"GitHub pages\" doxygen-generated\n[documentation](https://pdebuyl.github.io/fortran_hash_table/), you can access:\n\n- The documentation of the module `dictionary_m`.\n- The [list of files and test programs](files.html)\n- The [coverage data](coverage/index.html) generated from lcov and genhtml.\n\n## See also\n\nI am neither the first or the only person having implemented a hash table in Fortran. While\nthe implementations below did not fit my design goals, they might suit you just fine.\n\n- [HASTY](https://github.com/szaghi/HASTY) by Stefano Zaghi: *HASh Table fortran container exploting coarraY*.\n- In [FLIBS](http://flibs.sourceforge.net/) by Arjen Markus, `dictionaries` is a *Generic\n  source code for implementing a mapping of strings to data.*\n- The Fortran Wiki has a [page on hash tables](http://fortranwiki.org/fortran/show/Hash+tables).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdebuyl%2Ffortran_hash_table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpdebuyl%2Ffortran_hash_table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdebuyl%2Ffortran_hash_table/lists"}