diff --git a/Data/ByteArray.hs b/Data/ByteArray.hs
--- a/Data/ByteArray.hs
+++ b/Data/ByteArray.hs
@@ -62,6 +62,7 @@
 import Control.Monad.ST
 import Control.DeepSeq
 
+import Data.ByteString.Internal (inlinePerformIO)
 import qualified Data.Hashable as H
 
 #if defined(USING_GHC)
@@ -177,6 +178,7 @@
 touch x = IO $ \s-> case touch# x s of s' -> (# s', () #)
 
 hashByteArray arr = H.hashByteArray (unArray arr) 0 (length arr)
+{-# INLINE hashByteArray #-}
 
 #define deriveElt(Typ, Ct, rd, wrt, ix, sz) \
 instance Elt Typ where { \
@@ -226,7 +228,7 @@
 lengthM (MutableByteArray _ n) = n
 
 hashByteArray arr =
-    unsafePerformIO $
+    inlinePerformIO $
     withArrayPtr arr $ \ptr ->
     H.hashPtr ptr (length arr)
 
@@ -236,7 +238,7 @@
         = unsafeIOToST $ withMArrayPtr ary $ \ptr -> peekElemOff ptr ndx \
 ;   write ary ndx word \
         = unsafeIOToST $ withMArrayPtr ary $ \ptr -> pokeElemOff ptr ndx word \
-;   index ary ndx = unsafePerformIO $ withArrayPtr ary $ \ptr -> peekElemOff ptr ndx \
+;   index ary ndx = inlinePerformIO $ withArrayPtr ary $ \ptr -> peekElemOff ptr ndx \
 ;   elemSize = sizeOf \
 }
 
diff --git a/Data/SmallArray/Internal.hs b/Data/SmallArray/Internal.hs
--- a/Data/SmallArray/Internal.hs
+++ b/Data/SmallArray/Internal.hs
@@ -63,6 +63,7 @@
 
 instance H.Hashable (Array a) where
     hash (A bArr) = B.hashByteArray bArr
+    {-# INLINE hash #-}
 
 eqArray :: (Eq a, Elt a) => Array a -> Array a -> Bool
 eqArray a b
diff --git a/smallarray.cabal b/smallarray.cabal
--- a/smallarray.cabal
+++ b/smallarray.cabal
@@ -3,7 +3,7 @@
 -- See the Haskell package versioning policy
 -- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for
 -- standards guiding when and how versions should be incremented.
-Version:             0.2.1
+Version:             0.2.2
 
 Synopsis:            low-level unboxed arrays, with minimal features.
 
@@ -43,5 +43,8 @@
   Other-modules:       Data.ByteArray
                        Data.SmallArray.Internal
   
-  Build-depends:       base < 4.4, deepseq >= 1.1 && < 1.2, hashable < 1.1 && >= 1.0.1
+  Build-depends:       base < 4.4, deepseq >= 1.1 && < 1.2, hashable < 1.2 && >= 1.0.1,
+                       bytestring >=0.9 && <0.10
   ghc-options: -Wall -funbox-strict-fields -O2
+
+  -- cpp-options: -DTESTING_FFI
