Date: Tue, 13 Sep 2011 22:42:38 +0200 From: "C. P. Ghost" <cpghost@cordula.ws> To: Gary Kline <kline@thought.org> Cc: FreeBSD Mailing List <freebsd-questions@freebsd.org> Subject: Re: *caution* severely OT!! Message-ID: <CADGWnjV=eUasSxHvJsaDWdMK_VYZyuf_zHZR2udhX%2Btdk3Mf8g@mail.gmail.com> In-Reply-To: <20110913193442.GA11369@thought.org> References: <20110913193442.GA11369@thought.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Sep 13, 2011 at 9:34 PM, Gary Kline <kline@thought.org> wrote: > guys, > > can anyone start me on the way of porting a python program to C? > tia, Gary, if you experience a performance bottleneck somewhere, you may be better off performing some timings to determine the exact cause, and then to port the specific function(s) to a C module. Hints: ctypes, SWIG. Porting the whole program may not be necessary. Save yourself some quality time for other more pleasant tasks in life. ;-) But if you really must, I suggest to port the program to C++ instead of C, because there, you can make use of the excellent STL data types and containers, that match Python's somewhat. You may also consider using boost libraries, if the STL isn't enough. Good luck. > gary -cpghost. -- Cordula's Web. http://www.cordula.ws/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADGWnjV=eUasSxHvJsaDWdMK_VYZyuf_zHZR2udhX%2Btdk3Mf8g>