Improving Runtime Performance of Tensor Computations using Rust From Python
Harding, Kimberly Ann, Dunlavy, Daniel Michael · 2025
Read Improving Runtime Performance of Tensor Computations using Rust From Python by Harding, Kimberly Ann, Dunlavy, Daniel Michael (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/doe-osti-2999092-improving-runtime-performance-of-tensor.txt.
Description
Kimberly Harding and Daniel Dunlavy of Sandia test a speed trick for tensor computing, in report SAND2025-12493R. Tensors are data arrays with many axes, used in fields from brain research to quantum chemistry. Their Python Tensor Toolbox, pyttb, is flexible but pure Python loops run slowly. The Rust language compiles to fast native code and can be called from Python through add on modules.
The pair rewrote core pyttb steps in Rust, from simple sum and product loops to the multiplication steps behind low rank decomposition and tensor regression. Tests used made up data of many sizes. Rust beat plain Python across the board. It also beat Numba, a just in time Python compiler, on loop based steps, and beat NumPy on the steps tested. The report weighs where the gains come from and what to try next, giving users a proven route to faster runs.
Catalog record
| CREATOR | Harding, Kimberly Ann, Dunlavy, Daniel Michael |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 35 KB |
| LICENSE | Public Domain |
| RIGHTS | PUBLIC DOMAIN |
| SOURCE | DOE OSTI |