Use unsafeDupablePerformIO where possible
authorJohan Tibell <johan.tibell@gmail.com>
Mon, 25 Feb 2013 01:58:48 +0000 (17:58 -0800)
committerJohan Tibell <johan.tibell@gmail.com>
Mon, 25 Feb 2013 17:37:36 +0000 (09:37 -0800)
commit779189de142f1a95dc60533422c60cb665badd82
treed58f635887250fc196df5a1a439386b4a430b46a
parent7fd8f1852617bfc364f7c36cc6c194e323704e15
Use unsafeDupablePerformIO where possible

unsafeDupablePerformIO is much faster than unsafePerformIO and can be
used safely as long as the underlying operation is pure and we're fine
risking duplicating it in a multi-core scenario. unsafeDupablePerformIO
helps performance a lot on short string where the overhead of
unsafePerformIO dominates.

Closes #41.
Data/Text/Encoding.hs
Data/Text/Encoding/Fusion.hs
Data/Text/Lazy/Encoding.hs
Data/Text/Lazy/Encoding/Fusion.hs
Data/Text/Unsafe.hs