
On Sat, Feb 20, 2010 at 02:56:53PM -0500, Isaac Dupree wrote:
On 02/20/10 14:37, Ian Lynagh wrote:
There's also HIntegerByInt: http://www.haskell.org/pipermail/libraries/2007-August/007909.html although it would need to be changed to user lower level types etc.
that's true, (I wrote it), the current form uses a list-based implementation with a lot of recursion and I'd have to see how well that converts to some sort of array [at least I assume arrays are the only reasonable storage layout...]. I used a couple algorithms to make operations faster (at least multiplication -- I don't remember the details) so it might be useful code to pick up again. I have a bit of time now, if anyone's seriously interested, I could work on haskell integer code. As long as I had certain standards
-what am I trying to accomplish (at least, performance-wise)?
I think opinions are divided on this. Performance with word-sized Integer's is definitely important.
-what might be a good low-level format? (And is it important to strew unboxed ints all over the place, or is it fine to skip this and count on the optimizer?)
I think relying on the optimiser is OK, but don't forget that you don't have the standard (+) etc. Thanks Ian