Jon Harrop
2010-Dec-12 15:14 UTC
[LLVMdev] Two more HLVM benchmark results and questions about Windows and .NET
To illustrate the value of value types to the OCaml community I recently did a couple of benchmarks. The first was similar to a hash table and stores key-value pairs unboxed in an array: http://groups.google.com/group/fa.caml/msg/8430ebdb687b9268 The second is the hailstone benchmark that the Haskell guys found gave huge performance improvements when using LLVM from GHC: http://groups.google.com/group/fa.caml/msg/b62e9ba363cd10ee Surprisingly, the hailstone benchmark shows HLVM not only generating code 32× faster than OCaml but even beating GCC -O3 by a significant margin! Now that we've basically converted from Linux+OCaml to Windows+F#, I'm wondering how much interest there would be in using LLVM from F#. How many people are using LLVM under Windows? How well does it work? Are there existing .NET bindings that would make my life a dream come true? -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com
Kenneth Uildriks
2010-Dec-12 22:28 UTC
[LLVMdev] Two more HLVM benchmark results and questions about Windows and .NET
On Sun, Dec 12, 2010 at 9:14 AM, Jon Harrop <jon at ffconsultancy.com> wrote:> To illustrate the value of value types to the OCaml community I recently did > a couple of benchmarks. The first was similar to a hash table and stores > key-value pairs unboxed in an array: > > http://groups.google.com/group/fa.caml/msg/8430ebdb687b9268 > > The second is the hailstone benchmark that the Haskell guys found gave huge > performance improvements when using LLVM from GHC: > > http://groups.google.com/group/fa.caml/msg/b62e9ba363cd10ee > > Surprisingly, the hailstone benchmark shows HLVM not only generating code > 32× faster than OCaml but even beating GCC -O3 by a significant margin! > > Now that we've basically converted from Linux+OCaml to Windows+F#, I'm > wondering how much interest there would be in using LLVM from F#. How many > people are using LLVM under Windows? How well does it work? Are there > existing .NET bindings that would make my life a dream come true?I don't know of any existing .NET bindings. I suspect that most people working in .NET would use the built-in System.Reflection.Emit and System.Linq.Expression classes to generate code at runtime, especially since .NET 4.0 has LINQ expression support for building entire methods rather than single expressions. While LLVM might be able to generate better code in some circumstances, there would be managed/unmanaged overhead associated with calling the code and having the code call anything in .NET.
Possibly Parallel Threads
- [LLVMdev] Tag number of OCaml Variant in executionengine
- [LLVMdev] Tag number of OCaml Variant in executionengine
- [PATCH] Disable caml-stubdom by default
- [PATCH] customize: Correctly handle crypt(3) returning NULL.
- Proposal: always handle keys in separate process