[Haskell-cafe] Unboxed Rationals?

Victor Miller victorsmiller at gmail.com
Wed Jan 11 17:38:25 CET 2012


I have a program which does a lot of computations with Array's of
rationals.  In order to get better performance I'd like to use unboxed
arrays, but, since (Ratio Int) isn't a primitive type this doesn't work.
It occured to me that I could rewrite this using -fglasgow-exts where I
represent a rational by (# Int, Int #).  It isn't too hard to do this, but
I'd like to know it it's already in some library out there, so that I can
use something already existing.  This is a more general problem that I have
(I'm pretty new to Haskell) of finding a library to "do X".

Victor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120111/1358023b/attachment.htm>


More information about the Haskell-Cafe mailing list