Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hash-table-at

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hash-table-at

  • 0.1.0
  • PyPI
  • Socket score

Maintainers
1

hash-table

Custom hash table implementation that tries to replicate built-in Python dictionary. The aim is to better understand its functioning and apply TDD framework to test core functionalities.

Getting started

Missing

Technical Documentation

hash table key features

If you have any new feature, feel free to create a MR explaining this feature and I'll add that to the list

requirementincluded
Create an empty hash table
Insert a key-value pair
Accept arbitrary key type
Get a key-value pair
Delete a key-value pair
Update the value associated with an existing key
Hash table is iterable
Possible to compare to hash tables
Possible to convert python dictionary
String representation
Union operation
Miscellaneous (dict.clear() dict.update()
Managing Hash collision: linear probing
Managing Hash collision: separate chaining
Dynamic resizing
Retain insertion order

Features documentation

Missing

Improve performances

At the moment the actual performances are not comparable to python built-in dictionary. I've identified two key pain points that I want to improve in the search f a key:

  1. setitem uses string comparison, which is costly (O(N)). Want to move to hash comparison
  2. delitem has to remove key from a list in linear time (O(N)). Want to move away from lists to improve search, without loosing the key insertion order

License

This project is licensed under the MIT License - see the LICENSE file for details.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc