Skip to content
Open access

Benchmarking Python–Rust Integration for High-Performance Computing Tasks

Aug 2026 · International Journal For Multidisciplinary Research · 0 citations · 16 references

TL;DR

A benchmarking study of Python-Rust interoperability reveals that the Rust enhanced versions systematically execute faster than pure Pythoncode- up to three times faster in some cases.

Abstract

High-performance computing (HPC) requirementshave dramatically increased in recent years for a wide range oftasks, including data analytics, machine learning and system optimization. Although Python is a favored language in science and analysis, its dynamic features can cause performance bottlenecks.On the other hand, Rust is a new systems language that guarantees memory safety while offering near-native execution performance, and as such is a prime contender for high-performanceapplications. In this paper we conduct a benchmarking study of Python-Rust interoperability: We benchmark pure Pythonversions against Python code with embedded Rust routines (usingthe PyO3 package) for various tasks like arithmetic calculations,string operations, list operations, file operations and conditionalstatements. Our benchmarking experiments reveal that the Rust enhanced versions systematically execute faster than pure Pythoncode- up to three times faster in some cases. We also analysethe impact of effective language integration and reduced run-timeon more sustainable software engineering practices: by reducingthe overall number of CPU cycles, memory use and energy consumption, hybrid approaches enable more energy-efficient HPCapplications. Finally, we discuss when and how the Python–Rust co-development can be used to create high-performance andenergy-efficient solutions in scientific computing.

Read PDF

Similar papers

Open access 2023

Performance Bottlenecks Necks in Data Heavy Python Applications

Performance improvements in data-intensive Python applications have become more critical due to the increasing computational needs of modern analytics, machine learning, and large-scale data processing systems. Although the Python environment is enormous as well as flexible in development, frequent delay in execution, memory inefficiency and scalability problems are often encountered in many applications because of CPU demanding processes, over allocation of memory and I/O bottlenecks. In this research, we provide a systematic experimental technique to identify, classify, and resolve performance bottlenecks in large-scale Python applications. The approach we provide here unifies the profiling, benchmark based analysis, bottleneck detection, focused optimization, and quantitative validation into a single procedure. The proposed approach was tested on a transactional dataset of around 10 million records. We used performance profiling tools like cProfile, line_profiler and memory_profiler to identify computational bottlenecks, memory allocation inefficiencies and disk I/O latencies. Profiling findings were used to apply these optimization methods such as vectorization using NumPy and Pandas, multiprocessing, memory-efficient information management, and asynchronous I/O techniques. Experimental evaluation showed significant performance improvements, in particular decrease in execution time from 120 seconds to 50 seconds, reduction in peak memory use by roughly 38%, and significant gains in throughput and scalability under high workloads. The findings demonstrate that effective performance enhancement needs a systematic strategy that correlates bottleneck discovery, optimization selection along with validation rather than different tuning approaches. The proposed technique provides practical recommendations to improve computational performance, scalability, and resource consumption of data-intensive Python systems in production environments.

Madhurima Kommuru, Appala Nooka Kumar Doodala · 0 citations

On the co-design of runtimes, systems and programming interfaces for HPC

(English) High-performance computing (HPC) platforms are evolving towards increasingly complex architectures: many-core CPUs with multi-level NUMA hierarchies, heterogeneity with multiple classes of accelerators and higher-capacity interconnects. The increasing complexity and variety of resources in these machines make it harder for application programmers to use them efficiently and effectively. As a result, many resources in modern HPC clusters remain underutilized, limiting energy efficiency and the potential throughput of the machine. This thesis argues that addressing these challenges requires co-design across the software stack, from runtime mechanisms and programming interfaces to system-level policies. We first study task-based runtimes and identify opportunities to reduce overheads and improve scalability on many-core machines, introducing novel scheduling and dependency-management techniques that maintain throughput under extreme concurrency. We then tackle programmability and performance in heterogeneous systems, proposing runtime and interface support to better overlap data movement, accelerator offloading, and CPU computation. We also make a case for the effective co-design of applications and programming models through the study of an increasingly common application class: iterative data-flow computations, commonly used in simulations, iterative solvers, and AI. Through this study, we propose specific optimizations for this application class, showing how holistic co-design approaches can lead to significant speedups. Finally, we present the nOS-V library with the goal of improving system-wide utilization through application co-scheduling, and we later apply the same methodology to obtain truly interoperable programming models, enabling multiple runtimes and parallel libraries to coexist within a single application with reduced mutual interference. Overall, the contributions of this thesis provide a set of runtime techniques, programming abstractions, and system mechanisms that jointly improve throughput, efficiency, and composability on next-generation HPC systems. (Català) Les plataformes de Computació d'Altes Prestacions (HPC) estan evolucionant cap a arquitectures cada cop més complexes: processadors amb grans quantitats de nuclis i amb jerarquies de memòria d'accés no uniforme (NUMA) multi-nivell, heterogeneïtat en els sistemes amb múltiples tipus d'acceleradors, i interconnexions de més capacitat. L'increment de complexitat i la varietat de recursos en aquestes màquines complica la feina d'utilitzar-les de forma eficient i efectiva, la qual recau en les persones que les programen. El resultat és que, als centres de dades moderns, molts recursos acaben sent infrautilitzats, empitjorant la seva eficiència energètica i limitant la seva capacitat. Aquesta tesi proposa abordar aquests reptes mitjançant el disseny conjunt de components a totes les capes del programari, anant des dels mecanismes d'execució i les interfícies de programació fins al programari de sistema de baix nivell. Primerament, estudiem els mecanismes d'execució basats en tasques i identifiquem oportunitats per reduir el cost computacional associat a la gestió de tasques i millorar l'escalabilitat en sistemes amb molts nuclis, introduint noves tècniques de planificació i gestió de dependències que mantenen el rendiment fins i tot en nivells extrems de concurrència. A continuació, abordem els problemes de programabilitat i rendiment en sistemes heterogenis, proposant noves interfícies i sistemes d'execució per superposar de manera més efectiva el moviment de dades, l'execució en acceleradors i el càlcul al processador principal. També argumentem a favor d'un disseny conjunt entre aplicacions i models de programació mitjançant l'estudi d'una classe d'aplicacions cada vegada més habituals: els càlculs iteratius basats en dependències de dades, utilitzats sovint en simulacions, mètodes matemàtics iteratius i intel·ligència artificial. A partir d'aquest estudi, proposem optimitzacions específiques per a aquesta classe d'aplicacions, mostrant com el disseny conjunt pot conduir a millores de rendiment significatives. Finalment, presentem el programari de gestió de tasques nOS-V amb l'objectiu de millorar la utilització global del sistema mitjançant la coplanificació d'aplicacions, i posteriorment apliquem la mateixa metodologia per aconseguir models de programació realment interoperables, permetent que diversos models i biblioteques paral·leles convisquin dins d'una mateixa aplicació minimitzant la interferència mútua. En conjunt, les contribucions d'aquesta tesi proporcionen tècniques d'execució, abstraccions de programació i mecanismes de sistema que, de manera conjunta, milloren el rendiment global, l'eficiència i la composabilitat dels sistemes HPC de nova generació. (Español) Las plataformas de Computación de Altas Prestaciones (HPC) están evolucionando hacia arquitecturas cada vez más complejas: procesadores con grandes cantidades de núcleos y con jerarquías de memoria de acceso no uniforme (NUMA) multinivel, heterogeneidad en los sistemas con múltiples tipos de aceleradores, e interconexiones de mayor capacidad. El incremento de complejidad y la variedad de recursos en estas máquinas dificultan su uso eficiente y efectivo, una tarea que recae en las personas que las programan. Como resultado, en los centros de datos modernos muchos recursos terminan infrautilizados, empeorando su eficiencia energética y limitando su capacidad. Esta tesis propone abordar estos retos mediante el diseño conjunto de componentes en todas las capas del software, abarcando desde los mecanismos de ejecución y las interfaces de programación hasta el software de sistema de bajo nivel. En primer lugar, estudiamos los mecanismos de ejecución basados en tareas e identificamos oportunidades para reducir el coste computacional asociado a la gestión de tareas y mejorar la escalabilidad en sistemas con muchos núcleos, introduciendo nuevas técnicas de planificación y gestión de dependencias que mantienen el rendimiento incluso en niveles extremos de concurrencia. A continuación, abordamos los problemas de programabilidad y rendimiento en sistemas heterogéneos, proponiendo nuevas interfaces y sistemas de ejecución para superponer de manera más efectiva el movimiento de datos, la ejecución en aceleradores y el cálculo en el procesador principal. También defendemos un diseño conjunto entre aplicaciones y modelos de programación mediante el estudio de una clase de aplicaciones cada vez más habituales: los cálculos iterativos basados en dependencias de datos, utilizados frecuentemente en simulaciones, métodos matemáticos iterativos e inteligencia artificial. A partir de este estudio, proponemos optimizaciones específicas para esta clase de aplicaciones, mostrando cómo el diseño conjunto puede conducir a mejoras significativas de rendimiento. Finalmente, presentamos el software de gestión de tareas nOS-V con el objetivo de mejorar la utilización global del sistema mediante la coplanificación de aplicaciones, y posteriormente aplicamos la misma metodología para lograr modelos de programación verdaderamente interoperables, permitiendo que diversos modelos y bibliotecas paralelas coexistan dentro de una misma aplicación minimizando la interferencia mutua. En conjunto, las contribuciones de esta tesis proporcionan técnicas de ejecución, abstracciones de programación y mecanismos de sistema que, de manera conjunta, mejoran el rendimiento global, la eficiencia y la componibilidad de los sistemas HPC de nueva generación.

David Álvarez Robert · 0 citations
Book Open access Jul 2026

Analyzing HPC Job Wait Times under Resource Scaling Using Historical Workload Data

This work presents a data-driven framework that leverages historical job traces to estimate the impact of resource modifications on queue performance, and introduces the Weighted Wait-Time Score (WWS), a bounded metric that captures both typical and tail wait-time behavior.

Bipin Gaikwad, Shraddha Singh, M. Joshi et al. · 0 citations
Open access Aug 2026

Investigating Parallel Scaling Bottlenecks Across Rust, Julia, Haskell, and Python: Workload–Runtime Signatures

Parallel performance depends not only on programming language and runtime design, but also on how the dominant execution bottleneck changes as parallelism increases. We present a controlled cross-language study of Rust, Julia, Haskell, and Python using Merge Sort, Closest Pair of Points, and Numerical Sum in a multicore environment. For each of the three workloads, we evaluate four language-based implementations at five worker counts p∈{1,2,4,8,16} using two input sizes and 10 untrimmed trials per configuration, yielding 3 × 4 × 5 × 2 × 10 = 1200 benchmark observations. We propose a decomposition-based diagnostic framework built on three measured components: slowest-worker computation (Cp), algorithmic merge/combine work (Bp), and residual parallel overhead (Rp). Their normalized fractions, together with observed speedup, form a Workload–Runtime Scaling Signature (WRSS). Tracking WRSS across worker counts identifies Bottleneck Transition Points (BTPs). We additionally apply a standardized 20% component-reduction sensitivity analysis to express how strongly total parallel-region time depends on each measured component under an explicit ceteris-paribus assumption. Across the 3 × 2 × 4 = 24 workload–size–implementation conditions, each tracked over p∈{1,2,4,8,16}, 10 (41.67%) exhibit a bottleneck transition: six of eight Merge Sort conditions and four of eight Closest Pair conditions, whereas none of the eight Numerical Sum conditions exhibits a transition. At p=16, Merge Sort reaches only 2.02–3.19× median speedup because merge work dominates several configurations; Numerical Sum reaches 7.61–12.72× while remaining almost entirely computation-dominant. A separate 100-observation Python shared-memory ablation reduces Merge Sort residual overhead substantially, but leaves the merge stage dominant. The results show that useful parallelism depends on how workload structure and runtime mechanisms shape the evolution of the dominant bottleneck as worker count increases.

Muhammad Hassam Aslam Khan, Daniel Stapleton, Medha Kulkarni et al. · 0 citations
Preprint Aug 2026

Effect of Abstractions and Prompting Strategies on LLM-Guided High-Performance Optimizations

It is demonstrated that LLMs provided with specific optimization goals achieve better measured performance and validity rates when generating C code compared to creating computation pipelines and optimization schedules with established frameworks, suggesting that future development should explore alternative approaches for verifiable LLM-guided code optimization.

Jiří Klepl, Matyás Brabec, Martin Kruliš · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.