Tagged articles
CPython
66 articles · Page 1 of 1

21CTOOct 9, 2026 · Industry Insights
Python 3.16 will introduce an optional Rust backend for the zlib module, marking the first Rust code in CPython, with a roadmap to make Rust mandatory by Python 3.18 in 2029, while addressing performance gains, dependency concerns, and success criteria for the Rust for CPython initiative.
CPythonPEP 826PyO3
0 likes · 6 min read


21CTOSep 15, 2026 · Backend Development
CPython maintainers have abandoned plans to make Rust a required dependency, instead pursuing an optional Rust API for internal extensions, with integration targeting Python 3.16 in 2027, addressing platform compatibility, build system differences, and memory safety challenges while adopting Rust's Cargo-inspired tooling like uv.
CPythonCargoPython 3.16
0 likes · 7 min read

Upgrading a Python project from 3.11 to 3.12 can cause macOS App Store rejections because the new standard library embeds an "itms-services" URL string that Apple’s automated review flags, prompting CPython core developers to propose patches, distribution‑tool options, and a new compliance flag to resolve the issue.
App StoreCPythonCompliance
0 likes · 12 min read

Unlike fixed‑size integers in languages like C or Java, Python uses arbitrary‑precision integers that automatically expand, preventing overflow; this article explains the underlying CPython implementation, demonstrates the behavior with examples, and discusses the memory and performance trade‑offs of such limitless integers.
Arbitrary PrecisionCPythonPython
0 likes · 5 min read

Optimizing Python is challenging due to its dynamic nature, but various strategies—from using NumPy, Numba, and Cython to upcoming CPython enhancements like adaptive specialization, JIT, and GIL‑free versions—show promise for improving performance while preserving the language’s flexibility.
CPythonJITPerformance Optimization
0 likes · 7 min read

Recent updates from the Python Steering Council indicate a positive response to PEP 703, which proposes making the Global Interpreter Lock optional in CPython, outlining short‑, medium‑, and long‑term plans for experimental no‑GIL builds, community support, and potential default adoption.
CPythonPEP703global interpreter lock
0 likes · 4 min read

The article explains the launch of py‑free‑threading.github.io, describes the Global Interpreter Lock (GIL) and its performance impact, introduces PEP 703 which makes the GIL optional, and outlines why free‑threaded Python in CPython 3.13 is a significant step for multithreaded performance.
CPythonGILMultithreading
0 likes · 4 min read

The article examines CPython issue gh‑126133 where Hugo van Kemenade proposed simplifying the project's copyright notice by keeping only the first publication year, discusses legal feedback from the PSF, compares practices of major open‑source projects, and concludes with the accepted change merged into the main branch.
CPythonCopyrightLegal
0 likes · 9 min read

This article explains the inner workings of Python closures by tracing how nested functions are compiled into bytecode, how the CPython VM creates cell objects, binds them via the func_closure field, and stores variables in the localsplus array for static access.
CPythonFunctionPython
0 likes · 18 min read


21CTONov 13, 2024 · Fundamentals
The article examines CPython 3.13’s new free‑threading mode, its impact on the Global Interpreter Lock, benchmark results using a PageRank example, and practical multithreaded and multiprocessing implementations to show how performance can dramatically improve on modern multicore CPUs.
CPythonGILMultithreading
0 likes · 14 min read

The article dissects Python's CPython implementation of the if‑elif‑else control‑flow construct, detailing the generated bytecode, the POP_JUMP_IF_FALSE/TRUE instructions, jump macros, helper truth‑testing functions, computed‑goto support, and the role of instruction prediction in the virtual machine.
CPythonPOP_JUMP_IF_FALSEPython
0 likes · 21 min read

The article explains that CPython stores function local variables in a statically‑indexed array (f_localsplus), accesses them via GETLOCAL/SETLOCAL macros, and builds the locals() dictionary on demand, showing how exec, variable assignment order, and the hidden local namespace interact with this mechanism.
CPythonPythonbytecode
0 likes · 27 min read

This article dissects CPython's _PyEval_EvalFrameDefault function, explaining how the interpreter treats itself as a CPU, uses a stack frame, switches between Python and C call stacks, and employs computed‑goto optimizations to efficiently dispatch bytecode instructions.
CPythonbytecodecomputed goto
0 likes · 26 min read

This article explains Python's iterator protocol by showing how objects become iterable through __iter__, how the built‑in iter function creates iterator objects, the CPython internals of PyObject_GetIter, and how the __next__ method advances elements, with concrete code examples and source‑level snippets.
CPythonIterablePython
0 likes · 16 min read

This article explains Python's set type, covering its typical use cases, core API methods, and a deep dive into the CPython C implementation—including the PySetObject layout, hash table mechanics, field behavior, and differences from dictionaries.
CPythonData StructuresHash Table
0 likes · 18 min read

This article dissects the CPython implementation of three dictionary methods—get, setdefault, and popitem—showing example usage, walking through the C source code, explaining hash look‑ups, entry handling, and the subtle state changes that occur when keys are missing or removed.
CPythonData StructuresGET
0 likes · 14 min read

This article dissects CPython's dictionary implementation, explaining how a PyDictObject and its PyDictKeysObject are allocated, how method groups map to Python magic methods, and the detailed C logic for inserting, updating, and retrieving key‑value pairs, including __missing__ handling.
CPythonData StructuresHashMap
0 likes · 16 min read

Mark Shannon’s “Shannon Plan” for Faster CPython outlines three parallel initiatives—Tier 2 optimizer, enabling sub‑interpreters via PEP 554, and memory‑management improvements—aimed at making Python up to five times faster by Python 3.13, with Microsoft joining the effort.
CPythonPEP 554Python
0 likes · 4 min read

This article dissects Python's dictionary implementation, explaining the PyDictObject layout, the combined and split hash‑table designs, memory‑optimisation techniques, insertion and lookup processes, ordered iteration, and precise memory‑size calculations with concrete code examples.
CPythonData StructuresHash Table
0 likes · 24 min read

This article explains Python tuples as immutable list subsets, details their C‑level struct layout, creation and deallocation processes, the internal freelist cache for lengths up to 20, performance advantages over lists, and the special handling of the empty tuple singleton.
CPythonCacheData Structures
0 likes · 15 min read

The article explains the various sequence‑type operations that Python lists provide—concatenation, repetition, indexing, slicing, and element assignment—detailing how each is realized in CPython through the tp_as_sequence and tp_as_mapping slots and the corresponding C functions such as list_concat, list_repeat, list_subscript, and list_ass_subscript.
CPythonListc-implementation
0 likes · 13 min read

This article explains CPython’s list creation via PyList_New, details memory allocation, the role of the free‑list cache, the deallocation process in list_dealloc, and the trashcan mechanism that prevents recursion overflow, illustrating each step with code snippets and concrete examples.
CPythonListMemory Management
0 likes · 12 min read

The article explains CPython's object memory caching, details the structure of the tuple free‑list, reproduces a bug where length‑20 tuples aren't reused, shows the debugging steps, and presents a one‑line source change that corrects the issue in Python 3.12/3.13.
CPythonMemory ManagementPython
0 likes · 7 min read

Learn how to create native Python extension modules using Rust, set up the required tools, write and build the Rust code, and run Python scripts from a Rust binary, enabling you to combine Rust's performance and safety with Python's flexibility.
CPythonMaturinPython
0 likes · 6 min read


21CTOMay 18, 2024 · Fundamentals
This article traces the history of the Python Global Interpreter Lock, explains why it remains a performance bottleneck, and examines recent efforts such as multiprocessing, PEP 554, and sub‑interpreters that aim to mitigate or eliminate the GIL in CPython.
CPythonConcurrencyGIL
0 likes · 10 min read

This article explains the concept of Just‑In‑Time compilation for Python, introduces the copy‑and‑patch JIT proposed for CPython 3.13, shows how it works with bytecode templates, compares it to traditional JIT approaches, and presents simple benchmark results and implementation details.
CPythonCopy-and-PatchJIT
0 likes · 13 min read


21CTOJan 12, 2024 · Fundamentals
The upcoming CPython 3.13 release will optionally include a JIT compiler built on LLVM, offering modest speed gains of 2%‑9% today and promising larger improvements in future versions through advanced optimization techniques.
CPythonJITLLVM
0 likes · 6 min read


21CTOOct 19, 2023 · Fundamentals
This article explains what a Python interpreter is, outlines how Python code is executed, and compares the six most popular Python implementations—CPython, PyPy, Stackless, Jython, IronPython, and GraalPython—helping developers choose the right one for their projects.
CPythonGraalPythonIronPython
0 likes · 10 min read


21CTOOct 5, 2023 · Fundamentals
The article outlines the major performance and architectural goals for Python 3.12, describing the Faster CPython project’s specialized opcodes, multithreading proposals, object size reductions, memory‑management improvements, and API stability efforts that aim to boost speed and maintainability.
CPythonMemory ManagementPEP
0 likes · 8 min read

The article explains that the Python community is planning to make the Global Interpreter Lock optional, describing what the GIL is, its limitations, the contributions behind the change, and a multi‑stage roadmap from experimental builds in Python 3.13/3.14 to a long‑term default no‑GIL configuration.
CPythonGILPEP703
0 likes · 6 min read

Meta is backing PEP 703, which proposes adding a --disable-gil build option to CPython so that Python code can run without the Global Interpreter Lock, improving multithreaded performance on multi‑core CPUs, with Meta promising engineering resources to help implement it by 2025.
CPythonGILMeta
0 likes · 3 min read

Meta is promoting PEP 703, which proposes adding a --disable-gil build option to CPython so Python can run without the Global Interpreter Lock, and has pledged three engineer‑years by 2025 to help implement the change, while also noting its Threads product already runs on a heavily modified CPython backend.
CPythonConcurrencyGIL
0 likes · 3 min read

Microsoft announced a dedicated Faster CPython team, led by Mark Shannon and Guido van Rossum, to boost Python’s execution speed through a multi‑stage plan that has already delivered 10‑60% performance gains in Python 3.11 while emphasizing community collaboration and open‑source contributions.
CPythonMicrosoftPython
0 likes · 5 min read

This article explains the Global Interpreter Lock (GIL) in CPython, how it serializes thread execution on both single‑ and multi‑core CPUs, why it hampers parallelism, and what code patterns are safe or unsafe under its coarse‑grained locking.
CPythonGILMultithreading
0 likes · 7 min read

This article explains the purpose and mechanics of Python’s Global Interpreter Lock (GIL), how it serializes bytecode execution on single- and multi‑core CPUs, its impact on I/O‑bound versus CPU‑bound workloads, and why certain operations remain thread‑safe despite the lock.
CPythonGILMultithreading
0 likes · 8 min read


21CTONov 14, 2022 · Fundamentals
Microsoft assembled a six‑engineer team, including Guido van Rossum, to accelerate CPython according to a multi‑phase plan, resulting in Python 3.11 delivering 10‑60% speed improvements and showcasing how coordinated open‑source effort can overcome Python’s historic performance limitations.
CPythonLanguage DevelopmentMicrosoft
0 likes · 6 min read


21CTONov 9, 2022 · Fundamentals
An overview of Python’s primary interpreter implementations—including CPython, Jython, IronPython, PyPy, and Cython—highlights their origins, execution models, compatibility, performance characteristics, and unique advantages, helping developers choose the right runtime for their specific needs.
CPythonCythonInterpreters
0 likes · 4 min read

Microsoft’s Faster CPython team, formed with Guido van Rossum and six engineers, aims to accelerate CPython by up to five‑fold through staged improvements, already delivering 10‑60% speed gains in Python 3.11 while emphasizing collaborative development and community value.
CPythonMicrosoftPython
0 likes · 6 min read

The article explains how CPython implements integers as variable‑length base‑2³⁰ arrays, pre‑allocates the small‑integer range –5 to 256 as singleton objects for performance, and demonstrates the effect of this caching using the id() function and reference‑count analysis.
CPythonInteger cachingReference Counting
0 likes · 5 min read


21CTOJun 1, 2022 · Fundamentals
Python 3.11, slated for release in October 2022, delivers a 10‑60% performance boost over 3.10 thanks to the Microsoft‑backed Faster CPython project, which introduces adaptive specialization, memory‑allocator refinements, and several low‑level optimizations that trade a modest memory increase for faster execution.
CPythonInterpreter OptimizationMemory Management
0 likes · 5 min read

At the 2022 Python Language Summit, Sam Gross presented the latest progress on the nogil project, targeting Python 3.9, discussing new lock designs, proposed compiler flags to disable the GIL in Python 3.12, and the potential impact on third‑party libraries and CPython development.
CPythonConcurrencyGIL
0 likes · 6 min read

At the 2022 Python Language Summit, developer Sam Gross presented a proposal to eliminate CPython's Global Interpreter Lock by adding a new, more efficient lock mechanism that could debut in Python 3.12, sparking extensive discussion about multithreading performance and implementation challenges.
CPythonGILLock
0 likes · 4 min read

This article details a novel approach to overcoming CPython's Global Interpreter Lock by implementing a multi-interpreter architecture that isolates execution states, manages shared variables through thread-specific data, and introduces a subinterpreter pool to significantly enhance multi-core CPU utilization and algorithm execution performance.
CPythonConcurrencyGIL Optimization
0 likes · 15 min read


21CTOJan 18, 2022 · Fundamentals
On January 18, 2022 the Python Software Foundation released Python 3.10, 3.9, and a preview of 3.11, detailing performance gains, Windows installer issues, and a critical Cython‑related memory leak fixed in the upcoming 3.10.3 release.
CPythonCythonMemory Leak
0 likes · 5 min read

This article examines PEP 659, the Specializing Adaptive Interpreter proposed for CPython, explains its non‑JIT approach, details the warm‑up, adaptive, specializing and de‑optimisation phases, and walks through the actual source‑code implementation using the LOAD_GLOBAL instruction as a concrete example.
CPythonPEP 659Python
0 likes · 17 min read

This article summarizes Sam Gross’s nogil project—a Python 3.9 fork that removes the GIL—detailing its design changes, early benchmarks, integration challenges, and the community’s discussion on feasibility, performance, and the roadmap toward a GIL‑free CPython.
CPythonConcurrencyGIL
0 likes · 18 min read

The article examines why Python struggles on mobile devices and browsers, discusses the BeeWare project's effort to run CPython on Android, highlights technical and resource challenges, funding issues, and Guido van Rossum’s perspective on focusing Python on backend and scientific domains.
BeeWareCPythonmobile development
0 likes · 8 min read

The article examines Python's popularity in machine learning, the difficulties of running Python apps on iOS and Android, the BeeWare project's milestones and challenges, funding issues, and Guido van Rossum’s perspective on focusing Python on backend and scientific workloads.
AndroidBeeWareCPython
0 likes · 7 min read

Guido van Rossum revealed that the new “Shannon Plan” backed by Microsoft will target a 2× speed boost for CPython 3.11 through a specialized bytecode interpreter, stack optimizations, and other enhancements, while preserving ABI compatibility and open‑source principles.
CPythonGuido van RossumPEP 659
0 likes · 4 min read

Guido van Rossum’s recent “Making CPython Faster” talk reveals the Shannon Plan—a four‑year effort, backed by Microsoft, to boost Python’s performance up to five times, with the first milestone targeting a 2× speedup in the upcoming Python 3.11 release through adaptive bytecode interpreters and other optimizations.
CPythonGuido van RossumPEP 659
0 likes · 4 min read


21CTOMay 15, 2021 · Fundamentals
Guido van Rossum, now a Microsoft Distinguished Engineer, promises to boost CPython performance by up to five times without breaking existing code, detailing the team, funding, and security efforts behind the ambitious speed upgrades slated for Python 3.11 and beyond.
CPythonGuido van RossumMicrosoft
0 likes · 6 min read

This article explains CPython’s three‑layer memory allocator, PyMalloc, detailing how it organizes blocks, pools, and arenas to efficiently serve thousands of tiny object allocations while minimizing fragmentation and falling back to the system malloc for larger requests.
CPythonLow-level AllocationMemory Management
0 likes · 27 min read

This article explains how CPython implements its own memory‑management scheme—including the layered allocation model, pool and arena structures, block size classes, and reference‑count‑based reclamation—by dissecting the source code of Python 2.7’s obmalloc module.
CPythonGarbage CollectionMemory Management
0 likes · 23 min read

This article explains why Python is popular yet slower than compiled languages, introduces PyPy as a drop‑in replacement for CPython that uses JIT compilation to accelerate code by an average of 7.6×, and outlines its workings, benefits, and limitations.
CPythonJITPyPy
0 likes · 8 min read

This comprehensive guide walks you through the CPython source tree, shows how to clone, configure, and compile version 3.8.0b3 on macOS, explains the language grammar, tokenization, memory management, reference counting, and garbage collection, and provides practical code snippets for each step.
CPythonPython interpretercompilation
0 likes · 22 min read

An overview of major Python implementations—including CPython, Jython, IronPython, PyPy, and Pyston—explains their underlying technologies, performance characteristics, platform integrations, and ideal use cases, helping developers choose the most suitable runtime for their projects.
CPythonImplementationIronPython
0 likes · 6 min read

This article explores the origins, design trade‑offs, and performance impact of Python’s Global Interpreter Lock (GIL), explains why it persists in CPython, reviews past attempts to remove it, and offers practical guidance for developers seeking effective concurrency solutions.
CPythonConcurrencyGIL
0 likes · 12 min read

This article explores the origins, challenges, and ongoing research surrounding Python's Global Interpreter Lock (GIL), explaining why it limits multithreaded performance, how it has evolved, and what alternatives developers can consider for true parallel execution.
CPythonConcurrencyGIL
0 likes · 13 min read

Python’s list type appears flexible, but its underlying CPython implementation uses a dynamic resizing strategy without a pre‑allocated memory pool, allocating memory on demand via list_resize and PyMem_RESIZE, which this article explains through code analysis, memory size measurements, and practical recommendations.
CPythonListMemory Management
0 likes · 13 min read

This article explains Python's integer object implementation, detailing how small integers are cached in a fixed‑size pool, how larger integers are managed through a dynamic PyIntBlock structure, and why using xrange (or range in Python 3) avoids memory bloat.
CPythonMemory Managementinteger object
0 likes · 9 min read

The article recounts a four‑year investigation that uncovered and repaired a subtle race‑condition bug in Python's Global Interpreter Lock, detailing the bug's origin, the implemented fixes, performance testing, and the decision to make the GIL creation unconditional in Python 3.7.
CPythonGILPython
0 likes · 10 min read

This article compares the main Python implementations—CPython, Jython, IronPython, PyPy, and Pyston—explaining their design, runtime characteristics, and suitable use cases for developers choosing a Python runtime.
CPythonImplementationsIronPython
0 likes · 6 min read

This article explains the concept of Python generators, how the `yield` keyword creates iterator objects, the basic operations for iterating, practical examples such as infinite sequences, and dives into CPython's internal implementation including the call stack, generator creation, the `send`/`next` mechanisms, and bytecode execution details.
CPythonPythonbytecode
0 likes · 12 min read

The article explores the history, design challenges, and performance impact of Python's Global Interpreter Lock (GIL), explaining why it persists, how it limits multithreaded execution, and what recent changes and research reveal about possible alternatives.
CPythonConcurrencyGIL
0 likes · 12 min read

The article explores Python’s Global Interpreter Lock (GIL), explaining its origins, how it limits true multithreading, the challenges of removing it, historical attempts, recent improvements, and why developers often prefer multiprocessing over threading for parallel execution.
CPythonConcurrencyGIL
0 likes · 13 min read

This article explains Python’s double‑underscore name‑mangling for private attributes, how they can still be accessed via class methods, the pitfalls of attribute shadowing, and why deleting dict entries may raise errors due to CPython’s underlying C implementation.
CPythonPythonattribute shadowing
0 likes · 4 min read
