[Haskell-cafe] Trouble using unboxed arrays

Bulat Ziganshin bulat.ziganshin at gmail.com
Sat Nov 10 16:59:49 EST 2007

Hello Justin,

Saturday, November 10, 2007, 10:09:54 PM, you wrote:

>   makeArray :: [a] -> Ring a
>   makeArray ls = Ring (ST.runSTUArray (ST.newListArray (0, length ls - 1) ls))

unboxed arrays in std library are not polymorphic, look at

ps: as Stefan said, you will get very low performance with polymorphic
code without 100% inlining

Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com

More information about the Haskell-Cafe mailing list