I found this interesting: http://donsbot.wordpress.com/2010/02/21/smoking-fast-haskell-code-using-ghcs-new-llvm-codegen/
On 22 February 2010 19:43, Chris Lattner <clattner at apple.com> wrote:> I found this interesting: > http://donsbot.wordpress.com/2010/02/21/smoking-fast-haskell-code-using-ghcs-new-llvm-codegen/David Terei sent it a few days ago too, as part of another thread. (which prevented me of sharing too) ;) It's really interesting how the optimizations scrambled the code to a point of non-recognition, but making it much faster. Are the generic optimizations (also) tailored towards functional programming or was it just coincidence/luck? cheers, --renato http://systemcall.org/ Reclaim your digital rights, eliminate DRM, learn more at http://www.defectivebydesign.org/what_is_drm
On Feb 23, 2010, at 1:49 AM, Renato Golin wrote:> On 22 February 2010 19:43, Chris Lattner <clattner at apple.com> wrote: >> I found this interesting: >> http://donsbot.wordpress.com/2010/02/21/smoking-fast-haskell-code-using-ghcs-new-llvm-codegen/ > > David Terei sent it a few days ago too, as part of another thread. > (which prevented me of sharing too) ;) > > It's really interesting how the optimizations scrambled the code to a > point of non-recognition, but making it much faster. Are the generic > optimizations (also) tailored towards functional programming or was it > just coincidence/luck?Just coincidence. A better way of looking at it is that the generic optimizations are tailored to produce code that runs fast on a given CPU. While it is still clearly important to do language specific or language directed optimizations, one goal of LLVM is to support many languages well. I suspect that if we spent real time tuning code coming out of GHC that LLVM could do even better, -Chris
Maybe Matching Threads
- [LLVMdev] great (detailed) article about GHC + LLVM
- [LLVMdev] Any experiemnts/evaluations on LLVM and graph rewriting (term-rewriting) systems?
- [LLVMdev] Any experiemnts/evaluations on LLVM and graph rewriting (term-rewriting) systems?
- [LLVMdev] glasgow haskell appears to be adopting LLVM
- [LLVMdev] glasgow haskell appears to be adopting LLVM