Hi, On Fri, Jul 1, 2011 at 2:57 PM, Maciej Fijalkowski <fij...@gmail.com> wrote: > But it won't become an assembler instruction in the JIT, it'll still be a > call.
Indeed. But fixing this is not too hard. Grep for "math_sqrt" and "MATH_SQRT" in pypy/jit/*/*.py for an example of how we turn sqrt_nonneg(x) into a single assembler instruction. The function sqrt_nonneg() is defined in pypy/rpython/lltypesystem/module/ll_math.py, and is (indirectly) used when we call math.sqrt() in RPython. Of course if the idea introduced by math_sqrt is going to be used for a lot of other functions, like the ones you'll need to introduce, then we can also think of a general solution that would do mostly everything for you with just a keyword argument to llexternal(). A bientôt, Armin. _______________________________________________ pypy-dev mailing list pypy-dev@python.org http://mail.python.org/mailman/listinfo/pypy-dev