Le 2018-01-28 à 05:11, Yury V. Zaytsev a écrit :
I think that you might be confused about the fundamentals of the
technologies involved here.
Yes, I admit, i'm really just starting to understand PyPy fundamentals
and LLVM.
Once you translate a Django app into C code (let's assume this is
actually possible for the sake of the argument) and then compile it
into machine code using clang there is nothing more left for a JIT to
operate upon, because machine code is interpreted directly by the CPU.
I'm really sure its possible to generate a C or C++ file from
human-generated Python code. So far, I want to use the LLVM backend
(PyPy) to translate CPython classes into a tracing JIT compiler...
Tracing JIT engines like PyPy translate bytecode into machine code on
the fly taking into account invariants discovered during runtime,
which theoretically enables them to outperform machine code generated
without knowing the data it processes, and, in any case, run a lot
faster than the interpreted byte code.
I'm positive you can use PyPy in embedded C/C++ applications to enable
trace compilation of Python objects.
A possible source of confusion is that people often speak of speeding
things up with LLVM (or nowadays even GCC) JIT; in most cases this
amounts to so called method level JITs where specific isolated
functions are compiled on the fly into machine code by the
corresponding JIT backend and then called from the bytecode
interpreter instead of actually interpreting the original bytecode for
the method.
JIT is cool because it can theoretically makes Django and Python web
apps outperform C applications.
Anyways, having that said, I can't even infer what your original line
of thinking was to embed what into what to speed up what exactly...
I'm looking to use JIT as a replacement for Cython in a upcoming
Django-hotsauce release. :)
Cheers,
Etienne
--
Etienne Robillard
tkad...@yandex.com
https://www.isotopesoftware.ca/
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/ae3dfc98-b45a-d81f-7428-25ba6c93ba3d%40yandex.com.
For more options, visit https://groups.google.com/d/optout.