stdio-0.1.1.0: A simple and high performance IO toolkit for Haskell

Std.Data.PrimArray.BitTwiddle

Description

This module implement some bit twiddling with ghc primitives.

We currently didn't use all functions from this module though: the performance is not catching up c version yet. But this module and relevant benchmarks are kept in hope that once we have fully SIMD support in GHC, we might optimize these functions further to compete with c.

Reference:

Synopsis

# Documentation

Search a word8 in array.

Currently this function is ~4 times slow than c version, so we didn't use it.

The unboxed version of memchr

Search a word8 array in reverse order.

This function is used in elemIndexEnd, since there's no c equivalent.

The unboxed version of memchrReverse