ptr-poker-0.1.1.2: Pointer poking action construction and composition toolkit

Safe HaskellNone
LanguageHaskell2010

PtrPoker.Size

Description

Functions that compute the required allocation size by value.

Synopsis

Documentation

word64AsciiDec :: Word64 -> Int Source #

Efficiently count the amount of bytes required to encode Word64 as a decimal number in ASCII.

Implemented as a balanced tree of "ifs" centered around the middle of the range. This is much faster than anything based on logarithms.

int64AsciiDec :: Int64 -> Int Source #

Efficiently count the amount of bytes required to encode Int64 as a signed decimal number in ASCII.

Implemented as a balanced tree of "ifs" centered around the middle of the range. This is much faster than anything based on logarithms.

textUtf8 :: Text -> Int Source #

Efficiently count the amount of bytes required to encode Text in UTF8.