writing python extensions in assembly

Matthieu Brucher matthieu.brucher at gmail.com
Fri May 16 12:36:05 EDT 2008


>
> yeah I don't know much about that,  I was figuring perhaps I could limit
> the
> assembler parts / methodology to something I could write generically
> enough.. and if all else fails write for the other OS's or only support
> windows.   also I think I should be using SIMD of some sort, and I'm not
> sure but I highly doubt C++ compilers support SIMD.
>

Well, it is not the OS, but the ASM compiler.
As the other people, I will tell you to implement only the fraction of the
code that needs speed.

For the matter of an ASM Python extension, do not bother. Use a C extension
and embed inside the ASM parts that are needed.

Compilers can use SIMD calls. You can try the auto-vectorization support
(GCC and Visual Studio support it, at least partially). Then you can try
intrinsics that will give you the power of ASM without the troubles. They
are compiler specific, but not less than ASM ;)

Matthieu
-- 
French PhD student
Website : http://matthieu-brucher.developpez.com/
Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92
LinkedIn : http://www.linkedin.com/in/matthieubrucher
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080516/fff75181/attachment-0001.html>


More information about the Python-list mailing list