Cython

Started by Ryex, November 07, 2011, 07:48:05 pm

Previous topic - Next topic

Ryex

http://cython.org/

I got board in one of my now rare bits of free time and looked into it. turns out that it will be very useful for us.

What is Cython:
it is a python based language that allows c type defs the Cython compiler then translated the python code into C-code and compiled it with a c compiler. The c code runs inside the python run time and handles untyped things as python objects. it is perfect for building c extensions for python.

I can compiled MOST python code strait into c with moderate speedup and can dramatically improve performance when you start defining ctypes especially inside loops:

Where it will be useful:
as it generates binaries it will be perfect for writing our encryption library in we'll be able to get the speed of c while easily translating python objects and protecting the source code

Profiling our code base will allow us to optimize specific parts with cython.

We'll be able to compile most of our code base which will give us a slight performance boost as it will slightly reduce overhead for call lookups and it will protect our code base by presenting it as compiled python c code instead of raw source code. it will still be reverse able but much harder as they will have to translate it from binary calls which will frequently call into python into source code.

we should only break out Cython once we start getting ready to release.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

ForeverZer0

Wow, great find, Ryex.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Blizzard

Agreed, great find. Is it crossplatform? I mean, does it compile on Mac/Linux?
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Ryex

yep. anything thing python will build on cython will.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />