Stdlib or Third-Party? Empirical Performance and Correctness of LLM-Assisted Zero-Dependency Python Libraries
- URL: http://arxiv.org/abs/2605.21405v1
- Date: Wed, 20 May 2026 17:02:54 GMT
- Title: Stdlib or Third-Party? Empirical Performance and Correctness of LLM-Assisted Zero-Dependency Python Libraries
- Abstract summary: Third-party Python libraries introduce dependency management overhead, supply chain risk, and deployment friction.<n>We address this empirically through zerodep, a growing collection of single-file Python modules alib-only reimplementations of a popular third-party library.<n>Spanning over 40 modules across 12 categories -- including serialization, networking, cryptography, agent protocols, and text processing -- zerodep provides a controlled testbed for two interrelated questions.
- Score: 4.178382873374296
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Third-party Python libraries introduce dependency management overhead, supply chain risk, and deployment friction in constrained environments. A natural question is how much of this ecosystem can be replicated using only Python's standard library -- and at what correctness and performance cost. We address this empirically through zerodep, a growing collection of single-file Python modules, each a stdlib-only reimplementation of a popular third-party library, developed with LLM assistance under strict constraints: no external imports, single file, drop-in API compatibility, and mandatory correctness validation against the reference library. Spanning over 40 modules across 12 categories -- including serialization, networking, cryptography, agent protocols, and text processing -- zerodep provides a controlled testbed for two interrelated questions: (1) Where does the stdlib suffice? and (2) Can LLMs effectively generate correct, performant code under tight symbolic constraints? Systematic benchmarking shows that stdlib-only implementations achieve performance parity (within 2x of the reference) in the majority of cases. The primary performance cliff is C-extension-backed computation (image processing, binary serialization, low-level crypto), not the inherent overhead of pure-Python third-party libraries. Conversely, many widely-used libraries carry architectural overhead that LLM-generated stdlib reimplementations avoid, yielding 5--115x speedups in several categories. We characterize the stdlib capability boundary across complexity tiers and library categories, discuss where LLM-assisted development succeeds and where it requires iterative human correction, and examine implications for dependency-free software engineering at scale. zerodep is open-source at https://github.com/Oaklight/zerodep.
Related papers
- libhmm: A Modern C++20 Library for Hidden Markov Models with Correct MLE Emission M-Steps [0.0]
libhmm is a C++20 library for model parameter estimation, sequence decoding, and model selection.<n>It addresses two gaps in existing software: absence of a well-maintained, zero-dependency C++ HMM library suitable for embedding in production systems.
arXiv Detail & Related papers (2026-05-28T00:42:19Z) - Python Bindings for a Large C++ Robotics Library: The Case of OMPL [12.900006436558405]
Python bindings are a critical bridge between high-performance C++ libraries and the flexibility of Python.<n> generating bindings for larges is a tedious process that creates a heavy burden for a small group of maintainers.<n>In this work, we investigate the use of Large Language Models (LLMs) to assist in generating nanobind wrappers.
arXiv Detail & Related papers (2026-03-04T23:18:10Z) - GPT-4.1 Sets the Standard in Automated Experiment Design Using Novel Python Libraries [0.649540541957527]
Large Language Models (LLMs) have advanced rapidly as tools for automating code generation in scientific research.<n>This study systematically benchmarks a selection of state-of-the-art LLMs in generating functional Python code.<n>Results show that only a small subset of models consistently generate correct, executable code.
arXiv Detail & Related papers (2025-07-30T13:11:29Z) - The Last Dependency Crusade: Solving Python Dependency Conflicts with LLMs [10.800983456810165]
This paper investigates the use of Large Language Models (LLMs) to automatically repair dependency issues in Python programs.<n>We propose HGM (pronounced "plum"), a novel retrieval-augmented generation (RAG) approach that iteratively infers missing or incorrect dependencies.
arXiv Detail & Related papers (2025-01-27T16:45:34Z) - PyPulse: A Python Library for Biosignal Imputation [58.35269251730328]
We introduce PyPulse, a Python package for imputation of biosignals in both clinical and wearable sensor settings.<n>PyPulse's framework provides a modular and extendable framework with high ease-of-use for a broad userbase, including non-machine-learning bioresearchers.<n>We released PyPulse under the MIT License on Github and PyPI.
arXiv Detail & Related papers (2024-12-09T11:00:55Z) - pyvene: A Library for Understanding and Improving PyTorch Models via
Interventions [79.72930339711478]
$textbfpyvene$ is an open-source library that supports customizable interventions on a range of different PyTorch modules.
We show how $textbfpyvene$ provides a unified framework for performing interventions on neural models and sharing the intervened upon models with others.
arXiv Detail & Related papers (2024-03-12T16:46:54Z) - torchgfn: A PyTorch GFlowNet library [44.94532429787822]
We present torchgfn, a PyTorch library that aims to address this need.<n>Its core contribution is a modular and decoupled architecture which treats environments, neural network modules, and training objectives as interchangeable components.<n>This provides users with a simple yet powerful API to facilitate rapid prototyping and novel research.
arXiv Detail & Related papers (2023-05-24T00:20:59Z) - SequeL: A Continual Learning Library in PyTorch and JAX [50.33956216274694]
SequeL is a library for Continual Learning that supports both PyTorch and JAX frameworks.
It provides a unified interface for a wide range of Continual Learning algorithms, including regularization-based approaches, replay-based approaches, and hybrid approaches.
We release SequeL as an open-source library, enabling researchers and developers to easily experiment and extend the library for their own purposes.
arXiv Detail & Related papers (2023-04-21T10:00:22Z) - PyHHMM: A Python Library for Heterogeneous Hidden Markov Models [63.01207205641885]
PyHHMM is an object-oriented Python implementation of Heterogeneous-Hidden Markov Models (HHMMs)
PyHHMM emphasizes features not supported in similar available frameworks: a heterogeneous observation model, missing data inference, different model order selection criterias, and semi-supervised training.
PyHHMM relies on the numpy, scipy, scikit-learn, and seaborn Python packages, and is distributed under the Apache-2.0 License.
arXiv Detail & Related papers (2022-01-12T07:32:36Z) - MRCpy: A Library for Minimax Risk Classifiers [10.380882297891272]
Python library, MRCpy, implements minimax risk classifiers (MRCs) based on the robust risk minimization (RRM) approach.
MRCpy follows the standards of popular Python libraries, such as scikit-learn, facilitating readability and easy usage together with a seamless integration with other libraries.
arXiv Detail & Related papers (2021-08-04T10:31:20Z) - Solo-learn: A Library of Self-supervised Methods for Visual
Representation Learning [83.02597612195966]
solo-learn is a library of self-supervised methods for visual representation learning.
Implemented in Python, using Pytorch and Pytorch lightning, the library fits both research and industry needs.
arXiv Detail & Related papers (2021-08-03T22:19:55Z) - DoubleML -- An Object-Oriented Implementation of Double Machine Learning
in Python [1.4911092205861822]
DoubleML is an open-source Python library implementing the double machine learning framework of Chernozhukov et al.
It contains functionalities for valid statistical inference on causal parameters when the estimation of parameters is based on machine learning methods.
The package is distributed under the MIT license and relies on core libraries from the scientific Python ecosystem.
arXiv Detail & Related papers (2021-04-07T16:16:39Z) - Picasso: A Sparse Learning Library for High Dimensional Data Analysis in
R and Python [77.33905890197269]
We describe a new library which implements a unified pathwise coordinate optimization for a variety of sparse learning problems.
The library is coded in R++ and has user-friendly sparse experiments.
arXiv Detail & Related papers (2020-06-27T02:39:24Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.