
I believe that native support for bignums is a rather interesting and
good idea for Haskell and for other functional languages. Developing
native support provides the opportunity to implement many
optimizations for a specific language (without, of course, sacrificing
the usefulness of the design for other languages). In addition, bignum
arithmetic has been well studied and the implementation can result in
fast and efficient bignums operators.
We are currently implementing bignums for a pure subset of Scheme (we
call MT-Scheme) using different representations (e.g. lists and
arrays) with interesting results. We will, hopefully, present some
results at TFP 2005 that demonstrate impressive reductions in memory
allocation can be achieved with native support. As Simon P-J
suggested, we are looking into a tree representation to simplify
divide-and-conquer algorithms. This last line of work in just in its
preliminary stage. As they say, one step at a time.
Best wishes,
Marco
On 6/21/05, John Meacham
I should mention I have an ulterior motive for encouraging this. jhc currently has no bignum support. (Integer is the same size as the native intmax_t) However, I'd like to support them by implementing them in haskell directly and then attempting to improve jhc to the point where they run fast enough. If the work can be shared with ghc then so much the better.
John
-- John Meacham - ⑆repetae.net⑆john⑈ _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users