# Bitsliced SipHash

DevFeed: [Bitsliced SipHash](<https://devfeed.tech/articles/bitsliced-siphash-38922.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2013-01-30-bitsliced-siphash>)

Author: Marek

Published: 2013-01-29T23:00:00Z

Content type: tutorial

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [Algorithm](<https://devfeed.tech/topics/algorithm.md>), [parallel](<https://devfeed.tech/topics/parallel.md>), [implementation](<https://devfeed.tech/topics/implementation.md>), [C](<https://devfeed.tech/topics/c.md>), [Python](<https://devfeed.tech/topics/python.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [c](<https://devfeed.tech/tags/c.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [cycles](<https://devfeed.tech/tags/cycles.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [matrix](<https://devfeed.tech/tags/matrix.md>), [parallel](<https://devfeed.tech/tags/parallel.md>), [simd](<https://devfeed.tech/tags/simd.md>), [speed](<https://devfeed.tech/tags/speed.md>), [sse](<https://devfeed.tech/tags/sse.md>)

## AI overview

This article explains bitslicing through a SipHash implementation. It describes rewriting an algorithm as simple bit-level logical operations applied to wide SIMD vectors, which can reduce repeated parallel computations. It also discusses the substantial cost of transposing input and output bit matrices.

## Source excerpt

Bitsliced SipHash Few days ago I presented a Python and a C implementation of SipHash. This time for no reason whatsoever I implemented a bitsliced version of it. Bitslicing a crypto algorithm is usually done to speed it up when doing massively parallel operations. For example when trying to find a collision with brute force. Bitsliced implementation is only useful if you have a large number of exactly the same mathematical operations to be computed in parallel.