[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Python & chess



Paolo Pantaleo wrote:
> 2006/8/24, Ron Johnson <ron.l.johnson@cox.net>:
>> The 1st link in his email describes how when a python chess player
>> was (mechanically) converted to C++, the resulting app ran 10x faster.

> That's it, compiled languages are fastar than interperted ones.

    This is true.  However in modern computing most programs are sitting idle
so scripted languages are not as ill-suited as they once were.  Furthermore,
in the case of Python, they readily admit that there are some things that a
scripting language is poor for and, when those things are identified, it is
encouraged to the author to port the slow code to a far faster compiled
version which is called from within Python.  In doing this one retains the
speed of development that Python offers as well as the speed of execution that
a compiled language offers.  IE, code the 90-95% of the idle intensive stuff
in Python, optimize the 5% intensive in C/C++.

    So, strictly speaking, Python is not ill-suited if one follows the advice
of Python's own advocates.  :)  Write the interface in Python and have it call
the engine written in C.

-- 
         Steve C. Lamb         | But who decides what they dream?
       PGP Key: 8B6E99C5       |   And dream I do...
-------------------------------+---------------------------------------------

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: