Improving Runtime Performance of Tensor Computations using Rust From Python

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Harding, Kimmie, Dunlavy, Daniel M.
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912622595538944
author Harding, Kimmie
Dunlavy, Daniel M.
author_facet Harding, Kimmie
Dunlavy, Daniel M.
contents In this work, we investigate improving the runtime performance of key computational kernels in the Python Tensor Toolbox (pyttb), a package for analyzing tensor data across a wide variety of applications. Recent runtime performance improvements have been demonstrated using Rust, a compiled language, from Python via extension modules leveraging the Python C API -- e.g., web applications, data parsing, data validation, etc. Using this same approach, we study the runtime performance of key tensor kernels of increasing complexity, from simple kernels involving sums of products over data accessed through single and nested loops to more advanced tensor multiplication kernels that are key in low-rank tensor decomposition and tensor regression algorithms. In numerical experiments involving synthetically generated tensor data of various sizes and these tensor kernels, we demonstrate consistent improvements in runtime performance when using Rust from Python over 1) using Python alone, 2) using Python and the Numba just-in-time Python compiler (for loop-based kernels), and 3) using the NumPy Python package for scientific computing (for pyttb kernels).
format Preprint
id arxiv_https___arxiv_org_abs_2510_01495
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Improving Runtime Performance of Tensor Computations using Rust From Python
Harding, Kimmie
Dunlavy, Daniel M.
Mathematical Software
Numerical Analysis
G.4
In this work, we investigate improving the runtime performance of key computational kernels in the Python Tensor Toolbox (pyttb), a package for analyzing tensor data across a wide variety of applications. Recent runtime performance improvements have been demonstrated using Rust, a compiled language, from Python via extension modules leveraging the Python C API -- e.g., web applications, data parsing, data validation, etc. Using this same approach, we study the runtime performance of key tensor kernels of increasing complexity, from simple kernels involving sums of products over data accessed through single and nested loops to more advanced tensor multiplication kernels that are key in low-rank tensor decomposition and tensor regression algorithms. In numerical experiments involving synthetically generated tensor data of various sizes and these tensor kernels, we demonstrate consistent improvements in runtime performance when using Rust from Python over 1) using Python alone, 2) using Python and the Numba just-in-time Python compiler (for loop-based kernels), and 3) using the NumPy Python package for scientific computing (for pyttb kernels).
title Improving Runtime Performance of Tensor Computations using Rust From Python
topic Mathematical Software
Numerical Analysis
G.4
url https://arxiv.org/abs/2510.01495