Bulletin of the Belgian Mathematical Society - Simon Stevin

Fast vector arithmetic over $\mathbb{F}_3$

K. Coolsaet

Full-text: Open access


We show how binary machine instructions can be used to implement fast vector operations over the finite field $\mathbb{F}_3$. Apart from the standard operations of addition, subtraction and dot product, we also consider combined addition and subtraction, weight, Hamming distance, and iteration over all vectors of a given length. Tests show that our implementation can be as much as 10 times faster than the standard method of using modular arithmetic on arrays of bytes. For computing the Hamming distance even a factor of 33 can sometimes be reached, provided a recent CPU is used.

Article information

Bull. Belg. Math. Soc. Simon Stevin, Volume 20, Number 2 (2013), 329-344.

First available in Project Euclid: 23 May 2013

Permanent link to this document

Digital Object Identifier

Mathematical Reviews number (MathSciNet)

Zentralblatt MATH identifier

Primary: 65Y04: Algorithms for computer arithmetic, etc. [See also 68M07] 12E30: Field arithmetic 12-04: Explicit machine computation and programs (not the theory of computation or programming)

Fast vector arithmetic GF(3) 64-bit operations Hamming distance dot product


Coolsaet, K. Fast vector arithmetic over $\mathbb{F}_3$. Bull. Belg. Math. Soc. Simon Stevin 20 (2013), no. 2, 329--344. doi:10.36045/bbms/1369316548. https://projecteuclid.org/euclid.bbms/1369316548

Export citation