|
From: | Jacques Carette |
Subject: | Re: [Aldor-l] [Axiom-developer] Re: exports and constants |
Date: | Tue, 25 Jul 2006 10:59:05 -0400 |
User-agent: | Thunderbird 1.5.0.4 (Windows/20060516) |
Gabriel Dos Reis wrote:
Is this experiment available? I would be quite interested in looking at the details.(On performance side, last month, a colleague of mine and I did some experiments by writing a small Computer Algebra library in Haskell 98 and Generic Haskell. Disappointingly, there is a slowdown factor between 7 and 10 when going from Haskell to Generic Haskell. We don't know yet which part can be credited to the maturity of the compiler and which part is inherent to the approach. Anyway, it was aninteresting experience).
<ShamelessPlugWarning>Getting efficiency from meta-programs seems to be quite difficult, and even more so in a typeful system. Enough has been said about C++ template programming to assure everyone that a) it is hard, and b) it's not *really* typed. But it *is* possible to get both genericity and efficiency. As a side effect, one can also get much better code organization as well! See the paper "Multi-stage programming with functors and monads: eliminating abstraction overhead from generic code" by Carette & Kiselyov
(paper, code, tests, etc at http://www.cas.mcmaster.ca/~carette/metamonads/) published at GPCE05 (http://dx.doi.org/10.1007/11561347_18) as well as http://metaocaml.org/examples/gausselim/ which contains all the extras for an earlier paper published (later!) inScience of Computer Programming (http://dx.doi.org/10.1016/j.scico.2005.10.012).
You will see, especially in the GPCE05 work, code organization which is explicitly influenced by Axiom/Aldor. The principal reason that this work was done in MetaOCaml was that a) the type system is completely described (and proven to 'work') in published papers and b) the compiler sources are open [which was needed, not just nice-to-have].
Our basic thesis is that, given the right infrastructure, you can structure code like it ought to be structured (which is already what Axiom/Aldor strives for) and, without relying on the cleverness of compiler writers, get optimal efficiency. For linear algebra, this works. In separate work, it was shown that this works for FFT as well. We are currently extending the work to handle (numeric) solving of LODEs.
</ShamelessPlugWarning> JacquesPS: MetaOCaml has no introspection features at _all_, by design. No 'has' of anything like it. That makes things extra-challenging, yet still feasible, which was not clear at all when the work was begun.
[Prev in Thread] | Current Thread | [Next in Thread] |