Search the archive

14,355 indexed articles, 13,283 of them summarised by us.

Articles
14,355
Research papers
91,965
Models priced
2,249
Providers
163

5 results for “Cython”

Newest and most relevant first

FastAPI: Python type hints for high-performance APIs with automatic docs

Python developers can use type hints alone to get request validation, serialization, and auto-generated interactive API docs, cutting boilerplate versus Flask-style manual setup.

FastAPI is a free, open-source Python framework for building the behind-the-scenes 'APIs' that let apps talk to each other. Instead of developers manually checking incoming data and writing separate documentation, the framework reads the type labels already written in their code and does both automatically. It also runs faster than older Python tools like Flask. It is used in production by Uber, Netflix, and Microsoft.

FastAPI is an established, production-proven open-source Python framework (adopted by Uber, Netflix, and Microsoft) that reduces the engineering cost of building web APIs. By deriving validation and documentation from type annotations, it cuts maintenance work, most notably eliminating outdated API docs. Teams choosing a framework for new Python services face little risk, though no migration cost figures or benchmark timings are given.

FastAPI is an ASGI framework layering Starlette (routing) and Pydantic (validation, Cython-accelerated) on standard Python type hints, which drive 422 responses, serialization, and auto-generated OpenAPI docs at /docs (Swagger UI) and /redoc. Async (async def) and sync (def) routes are both supported, with built-in dependency injection. Performance claims are qualitative: uvloop/httptools via Uvicorn is said to rival Node's Express and Go's Gin, but no benchmark numbers are given.

GitHub Opensource Projects →

Numexpr

Numexpr lets engineers evaluate large NumPy array expressions in one pass, avoiding temporary arrays that can double memory use and getting 2x–4x speedups via multithreading.

Numexpr is a small open-source Python library for doing maths on large tables of numbers, the kind you'd normally handle with the popular NumPy library. Instead of computing each step of an expression separately, which creates wasteful temporary copies and eats memory, it runs the whole calculation at once and can use all your computer's processor cores. The article claims 2x–4x speedups on large arrays. It suits people working with big datasets on laptops or limited-RAM machines.

For teams processing large numeric datasets on memory-constrained hardware, Numexpr is a free open-source drop-in improvement over plain NumPy for arithmetic expressions, cutting memory spikes and delivering 2x–4x speedups on big arrays. It requires no new language, the same maths written as a string. It does not replace NumPy for broadcasting or indexing, and teams needing heavier acceleration may still choose Numba or Cython. No cost, version number or adoption figures are given.

Numexpr evaluates string array expressions like ne.evaluate('a + b * c') by compiling them to virtual machine bytecode executed in a tight C loop, eliminating NumPy's per-sub-expression temporary arrays. It multithreads heavy numeric operations (trig, exp, log) by default, recognizes patterns like division and absolute value, and uses look-up tables for some functions, yielding 2x–4x speedups on large arrays. Limitations: no broadcasting or fancy indexing support; no version or benchmark datasets are specified.

GitHub Opensource Projects →

cysqlite - a new sqlite driver

Python developers finally get a usable alternative to the stdlib sqlite3 module's transaction handling, plus custom virtual table support and a working Pyodide/WASM build.

A programmer named Charles Leifer has released an early version of cysqlite, a replacement for the SQLite database tool that comes built into the Python language. Its biggest difference is how it handles transactions, the units of work databases use to keep data safe, more faithfully than the standard version. The author also used the Claude Code AI assistant to build a browser version, which passed 115 of 116 tests.

cysqlite is a ground-up rewrite of Python's standard SQLite driver by Charles Leifer, maintainer of the pysqlite3 fork since 2018. It fixes transaction handling the standard library has never matched to SQLite's own autocommit behaviour, and adds custom virtual tables. Risk is low but real: version 0.1.4 is an early release, so adoption is best limited to side projects until it matures. Teams doing in-browser Python (Pyodide) gain most today.

Charles Leifer's cysqlite is a Cython-compiled C extension replacing Python's sqlite3 module, whose two transaction modes both deviate from SQLite's native autocommit. It supports custom virtual tables, absent from sqlite3. Simon Willison used Claude Code to build a 688KB emscripten WASM wheel (cysqlite-0.1.4, cp311, Emscripten 3.1.46) loadable via micropip into Pyodide 0.25.1 only, it fails on 0.27.5 due to an Emscripten version mismatch. The browser demo runs 115/116 tests (1 skipped), SQLite 3.51.2.

Simon Willison’s Weblog →

Enabling Scalable AI-Driven Molecular Dynamics Simulations

Researchers running machine learning molecular dynamics can now connect PyTorch potentials to LAMMPS across hundreds of GPUs without writing custom distributed-communication code.

Scientists use simulations of atoms to study materials and chemistry, but these calculations are so large they strain even powerful computers. NVIDIA, Los Alamos and Sandia built a bridge that lets a popular simulation package called LAMMPS use machine-learning models written in PyTorch, spread across many GPUs. In tests, communication shortcuts gave speedups of up to 3x on 512 NVIDIA H100 GPUs. The tool ships in the LAMMPS September 2025 release or a prebuilt NVIDIA container.

NVIDIA, Los Alamos National Lab and Sandia National Lab have released a PyTorch-to-LAMMPS interface for machine-learned atomic simulations, available now in the LAMMPS September 2025 release or a prebuilt NVIDIA container. For computational chemistry and materials teams, this removes integration work when scaling models to multi-GPU clusters. Benchmarks on up to 512 H100s showed 1.4x to 3x speedups, and a cuEquivariance-accelerated MACE plugin beat a libtorch C++ version on a single A100.

The ML-IAP-Kokkos interface uses Cython to connect PyTorch MLIPs to LAMMPS, requiring developers to subclass MLIAPUnified and implement compute_forces. Message-passing hooks forward_exchange and reverse_exchange synchronize ghost-atom features across GPUs and register autograd gradients for distributed training. Weak-scaling benchmarks of HIPPYNN on 1-512 H100s (about 20³ atoms per GPU, aluminum lattice) gave 1.4x, 2.1x and 3x speedups for two-, three- and four-layer potentials. First and last exchanges can often be skipped; a cuEquivariance MACE plugin outperformed the libtorch pair style on one A100.

NVIDIA Developer Blog →

Run Your Python Code up to 80x Faster Using the Cython Library

Cython is a tool that makes Python code run much faster by converting it to C, helping businesses process data quicker and save resources for demanding tasks.

Leveraging Cython can accelerate Python code execution by up to 80x, enabling businesses to optimize critical applications and reduce computational costs without full C language overhaul.

The article details a four-step method using Cython to compile Python code into C extensions, achieving up to 80x speed improvements for compute-intensive workflows.

Towards Data Science Blog →