
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
The following benchmark compares the performance in the original difflib implementation, the library cdifflib and CyDifflib
You can install this library from PyPI with pip:
pip install cydifflib
CyDifflib provides binary wheels for all common platforms.
For a source build (for example from a SDist packaged) you only require a C++11 compatible compiler. You can install directly from GitHub if you would like.
pip install git+https://github.com/rapidfuzz/CyDifflib.git@main
The library can be used in the same way as difflib. Just use the cydifflib
module instead of difflib
:
# from difflib import SequenceMatcher
from cydifflib import SequenceMatcher
The official documentation of difflib explains how to use the library. If you work with a library which internally uses some of the algorithms of difflib it is possible to replace the implementation before importing this library. E.g. for thefuzz
this can be done in the following way:
from cydifflib import SequenceMatcher
import difflib
difflib.SequenceMatcher = SequenceMatcher
from thefuzz import fuzz
PRs are welcome!
Thank you :heart:
Copyright 2021-present Max Bachmann. CyDifflib
is free and open-source software licensed under the MIT License.
FAQs
Fast implementation of difflib's algorithms
We found that cydifflib 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
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.