{"id":25449788,"url":"https://github.com/asheehuang/hashing-wasm","last_synced_at":"2026-02-28T00:09:13.809Z","repository":{"id":277691505,"uuid":"933215810","full_name":"AsheeHuang/hashing-wasm","owner":"AsheeHuang","description":"Implements an Elastic Hash Table in Rust based on techniques described in the research paper Optimal Bounds for Open Addressing Without Reordering","archived":false,"fork":false,"pushed_at":"2025-02-20T03:28:46.000Z","size":15,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-16T09:07:31.132Z","etag":null,"topics":["algorithm","hashing","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AsheeHuang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-15T12:40:27.000Z","updated_at":"2025-04-07T10:59:38.000Z","dependencies_parsed_at":"2025-02-15T13:34:21.403Z","dependency_job_id":"dc9236f1-1df0-4e8c-9bc2-a935d5009b71","html_url":"https://github.com/AsheeHuang/hashing-wasm","commit_stats":null,"previous_names":["asheehuang/hashing-wasm"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsheeHuang%2Fhashing-wasm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsheeHuang%2Fhashing-wasm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsheeHuang%2Fhashing-wasm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsheeHuang%2Fhashing-wasm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AsheeHuang","download_url":"https://codeload.github.com/AsheeHuang/hashing-wasm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254501546,"owners_count":22081529,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["algorithm","hashing","rust"],"created_at":"2025-02-17T21:19:08.499Z","updated_at":"2026-02-28T00:09:13.766Z","avatar_url":"https://github.com/AsheeHuang.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Elastic Hash Table in Rust\n\nThis repository implements an **Elastic Hash Table** in Rust based on techniques described in the research paper [*Optimal Bounds for Open Addressing Without Reordering*](https://arxiv.org/abs/2501.02305v1). The core elastic hashing functionality is complete, while a WebAssembly (WASM) demo is planned for the future.\n\n## Overview\n\nThe elastic hash table is designed for open addressing without reordering and achieves optimal probe complexities in both average and worst-case scenarios. The design draws inspiration from the techniques introduced in the original paper by Farach-Colton, Krapivin, and Kuszmaul, which include:\n\n- **Elastic Hashing:** A method that uses a multi-level table structure with geometric capacity reduction.\n- **Quadratic Probing:** A probing strategy implemented with Rust's `DefaultHasher` to simulate random probe sequences.\n- **Load-Dependent Probing:** Using a probe limit function _f(ε)_ = _c · min(log₂(1/ε), log₂(1/δ))_ to balance insertions between levels.\n\nCurrently, only the elastic hashing portion is implemented. Future work will include a web demo (using WebAssembly) and additional algorithms (e.g., funnel hashing).\n\n\n## Installation\n\n### Prerequisites\n\n- [Rust](https://www.rust-lang.org/) (latest stable version)\n- [Cargo](https://doc.rust-lang.org/cargo/)\n\n### Clone the Repository\n\n```bash\ngit clone https://github.com/asheehuang/hashing-wasm.git\ncd hashing-wasm\n```\n\n### Build and Run Tests\n\n```bash\ncargo build\ncargo test\n```\n\n## Usage\n\nBelow is a simple example of how to use the elastic hash table in your Rust project:\n\n```rust\nuse elastic_hash_table::ElasticHashTable;\n\nfn main() {\n    // Create an elastic hash table with a total capacity of 128 and a delta of 0.1.\n    let mut table = ElasticHashTable::new(128, 0.1);\n\n    // Insert some key-value pairs.\n    for i in 0..50 {\n        table.insert(i, format!(\"Value {}\", i)).expect(\"Insertion failed\");\n    }\n\n    // Search for keys and print their corresponding values.\n    for i in 0..50 {\n        if let Some(val) = table.search(\u0026i) {\n            println!(\"Key {}: {}\", i, val);\n        } else {\n            println!(\"Key {} not found.\", i);\n        }\n    }\n}\n```\n\n## Reference\n\nThe design of this elastic hash table is based on the techniques described in:\n\n- **Farach-Colton, Martín; Krapivin, Andrew; Kuszmaul, William.** *Optimal Bounds for Open Addressing Without Reordering.* [arXiv:2501.02305v1](https://arxiv.org/abs/2501.02305v1)\n\n## Future Work\n\n- **Web Demo:** Develop a WebAssembly (WASM) demo with an interactive UI to visualize the behavior of the elastic hash table.\n- **Funnel Hashing:** Implement and integrate funnel hashing as described in the original paper.\n- **Performance Benchmarks:** Provide detailed performance comparisons and benchmarks.\n\n## Contributing\n\nContributions, issues, and feature requests are welcome! Please check the [issues page](https://github.com/asheehuang/hashing-wasm/issues) for details.\n\n---\n\nFeel free to adjust any details (such as repository URL, contributing guidelines, or future work) to better suit your project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasheehuang%2Fhashing-wasm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasheehuang%2Fhashing-wasm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasheehuang%2Fhashing-wasm/lists"}