
Hi,
I'd like to use llvm from python to generate dynamically:
1) llvm functions from python expressions, eg. an "apply" operation on a c-array of floats 2) callback functions 3) calls to an external dynamic loaded c-library
I've looked at the llvm python wrappers but the size of the .so module is just too massive (120Mb). However, I don't think it is actually necessary for what I want to do, as I can just generate llvm code and send that to the llvm compiler (at runtime).
This is what the pypy guys do. They mentioned maybe using the llvm-API, what for ? All that jazz is for people writing optimizing compilers, no ? Wouldn't it make more sense to do all that biz on the python level ?
I did a preliminary test of calling a trivial c-function (in a dynamic lib) from llvm, by hardcoding the function address, and it seemed to work ok.
So my main question is: am I on the right path; is this a reasonably cross-platform strategy ?
Also i wanted to post to the pypy developers: there seems to be some mutual gravity here. Where I work we do heavy duty numeric processing with python (machine learning) [1]. Maybe I will get a chance to work on/with/steal from, pypy. (The guys here are absolutely obsessed with speed.)
I just found out that the python AST branch has been merged, so i'll be investigating this aswell.
bye for now,
Simon.
[1] https://lineal.developer.nicta.com.au/lineal

Hi there,
On Fri, Oct 28, 2005 at 10:59:56AM +1000, Simon Burton wrote:
Also i wanted to post to the pypy developers: there seems to be some mutual gravity here. Where I work we do heavy duty numeric processing with python (machine learning) [1]. Maybe I will get a chance to work on/with/steal from, pypy. (The guys here are absolutely obsessed with speed.)
Take a look at what was done during the last sprint in Paris. You'll see that some time was spent trying to hook things to Numeric's array classes... Ludovic could tell you about the details but he is on vacation today. Maybe this week-end if he logs in.
participants (2)
-
Nicolas Chauvat
-
Simon Burton