From owner-freebsd-questions@FreeBSD.ORG Tue Sep 13 20:42:39 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BC521065670 for ; Tue, 13 Sep 2011 20:42:39 +0000 (UTC) (envelope-from cpghost@cordula.ws) Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by mx1.freebsd.org (Postfix) with ESMTP id 4BBD38FC08 for ; Tue, 13 Sep 2011 20:42:38 +0000 (UTC) Received: by vws12 with SMTP id 12so1233000vws.17 for ; Tue, 13 Sep 2011 13:42:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.151.67 with SMTP id b3mr1021058vcw.49.1315946558433; Tue, 13 Sep 2011 13:42:38 -0700 (PDT) Received: by 10.220.86.77 with HTTP; Tue, 13 Sep 2011 13:42:38 -0700 (PDT) X-Originating-IP: [93.221.177.157] In-Reply-To: <20110913193442.GA11369@thought.org> References: <20110913193442.GA11369@thought.org> Date: Tue, 13 Sep 2011 22:42:38 +0200 Message-ID: From: "C. P. Ghost" To: Gary Kline Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD Mailing List Subject: Re: *caution* severely OT!! X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Sep 2011 20:42:39 -0000 On Tue, Sep 13, 2011 at 9:34 PM, Gary Kline 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/