diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2019-01-18 00:01:45 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2019-01-31 12:46:51 -0500 |
commit | d887f3749c4c9c0f30fb9805cf8953efbcd44b82 (patch) | |
tree | e79085c0621556c26b18fe0fb017fe0e28519bbf /libraries | |
parent | 4fa32293c9d2658ce504b8fe6d909db2acf59983 (diff) | |
download | haskell-d887f3749c4c9c0f30fb9805cf8953efbcd44b82.tar.gz |
Optimize pprASCII
* Use `ByteString.foldr` instead of `(List.foldr . BS.unpack)`
* Avoid calling `chr` and its test that checks for invalid Unicode
codepoints: we stay in the ASCII range so we know we're ok
* Avoid calling `isPrint` (unsafe FFI call): we can check the ASCII
printable range directly
* Use bit operations (`unsafeShiftR`, `.&.`) instead of `div` and `mod`
Diffstat (limited to 'libraries')
0 files changed, 0 insertions, 0 deletions