Le 07/07/2013 20:43, Mehdi AMINI a écrit :
* jit typing will give a bad user experience as compilation is really slowThis is an issue, it takes between 15 and 20 second to compile a trivial example on my laptop. I think it should be improved. A target should be between 1 and 2 second for a reasonable user-experience.
NT2 said that they should reduce by 3 the compilation time.
However, distutils integration, as done in cython, seems usefulI don't know about it.@Joker: sorry, I hope you did not go to far in the dev...I have a first version working, but I still have the cache to finish. So I think I'll set up a branch for it anyway.About JIT, we can provide both interface. The one we have now and a jit too, isn't it? I think that something more important than decorator @jit is to compile only decorated functions in a file. For example, if we have a class and many function in a file. It can be good to compile only annotated function without crashing because of (not supported) class.I see a few way toimplement this, but I'd like pythraner's adivce first :-)In this case, annotated function can be jit if they are not already compiled? (jit is only a "plus" in this case, not the main feature)Agreed. I'm working with this in mind. The basic decorator is fine for pure JIT. The cache provides you already the "jit if they are not already compiled". An option would be to be able to force to compile ahead of time for multiple types. The decorator could be enhanced this way:@pythran.jit({int,int},{float,float}) def foobar(myarg1,myarg2): ...
I prefer: @pythran.jit(int,int) @pythran.jit(float,float) def foobar(myarg1,myarg2): ... but I don't know if it is possible...
The different types are available for compilation when the decorator is *initialized* instead of when the function is called. It mean that even without any callsite the compilation would occur for these types.Is it possible to compile the function in a thread for "typed jit"? And recompile the function when use if type doesn't exist in the current *.so file?
I'm open to any further idea :) Best, Mehdi
Good luck :)