[LLVMdev] Boxing and vectors

Jon Harrop jon at ffconsultancy.com
Thu Nov 29 13:06:59 PST 2007

So I now have a working first-order language that uses conventional boxing to 
handle polymorphism and with ints, floats and ('a -> 'a) functions.

After a huge amount of detailed benchmarking in OCaml and F# I have decided 
that it is very important to be able to unbox complex numbers but no other 
compound types. As LLVM provides a vector type for power-of-two 
dimensionalities that compiles to efficient parallel code, I'd like to know 
if I can store them unboxed in a way that is equivalent to my ints, floats 
and function pointers, i.e. can I cast to and from them or must I add an 
indirection via a pointer?

Also, do these vectors give significant performance improvements on x86-64 
hardware or are they only good for x86+SSE and relatives?

Dr Jon D Harrop, Flying Frog Consultancy Ltd.

More information about the llvm-dev mailing list