High-Level Big Integer Arithmetic in Futhark for GPUs

๐Ÿ“… 2026-07-30
๐Ÿ“ˆ Citations: 0
โœจ Influential: 0
๐Ÿ“„ PDF
๐Ÿค– AI Summary
This work investigates the efficient GPU implementation of high-order, block-level arithmetic operations for medium-sized large integers (ranging from 2ยนโต to 2ยนโน bits). Leveraging the functional language Futhark, the authors concisely express algorithms for addition, subtraction, multiplication, and division using high-level abstractions, while relying on the compiler to automatically map arrays to GPU registers for performance optimization. Through targeted compiler enhancements, the Futhark implementation achieves performance approaching that of hand-optimized C++/CUDA code and the CGBN library. These results demonstrate that high-level functional languages can effectively combine expressive power with computational efficiency in high-performance computing contexts.
๐Ÿ“ Abstract
We report on GPU implementations of block-level addition, subtraction, multiplication and division for midsize integers, with operands of $2^{15}$ to $2^{19}$ bits using the high-level functional language Futhark. Comparing with hand-written C++/CUDA versions and CGBN, we identify which functional constructs compile well, where memory placement and sequentialization are effective, and what compiler support is needed. The results show that high-level code can express the algorithms compactly while approaching competitive performance after certain compiler improvements. In particular, we find that automated placement of arrays in GPU register memory is critical for performance.
Problem

Research questions and friction points this paper is trying to address.

Big Integer Arithmetic
GPU
Futhark
High-Level Language
Register Memory
Innovation

Methods, ideas, or system contributions that make the work stand out.

Futhark
GPU
big integer arithmetic
register memory allocation
functional programming