on master help sign in
Replace findIndex with elemIndex for nice speedup
commit613de76c48d17d719599a144fe195eb5fec6f85d authorBryan O'Sullivan <bos@serpentine.com> dateSun 10 May 2015, 22:26 (11 years ago) parent05c9e0c
1 file changed+1−1
Data/Aeson/Parser/Internal.hs+1−1
Data/Aeson/Parser/Internal.hs+1−1
@@ -237,7 +237,7 @@ unescape s = unsafePerformIO $ do
237237 start <- Z.take 2
238238 let !slash = B.unsafeHead start
239239 !t = B.unsafeIndex start 1
240− escape = case B.findIndex (==t) "\"\\/ntbrfu" of
240+ escape = case B.elemIndex t "\"\\/ntbrfu" of
241241 Just i -> i
242242 _ -> 255
243243 if slash /= BACKSLASH || escape == 255