
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
cidrtrie
is a simplistic implementation of a prefix tree and a library for classifying IP addresses based on prefix matching. Unlike other implementations (such as py-radix), this is pure-Python and aims to be as simple as possible.
This implementation offers asymptotic performance improvement for problems that look like Internet routing.
bench.py
contains a simple and used-elsewhere O(n) implementation ("NaiveCidrClassifier
) of this same functionalify. Some sample numbers for inserting 100,000 cidrs into the tree and then looking up 10,000 IPs on a 3GHz Intel i7-4578U:
insert CidrClassifier 5.16s
insert NaiveCidrClassifier 0.11s
lookup CidrClassifier 0.25s
lookup NaiveCidrClassifier 92.11s
An example use case would be to efficiently map IP addresses (from logs or some other source) to the originating network (and, eventually, to the owner) without using a commercial library like MaxMind or bringing in any native-code dependencies.
FAQs
Prefix Tree (trie) for manipulating CIDR sets
We found that cidrtrie demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.