Page 3 of 8 FirstFirst 12345 ... LastLast
Results 21 to 30 of 77

Thread: Python's slow

  1. #21
    Join Date
    Jul 2008
    Beans
    1,706

    Re: Python's slow

    Quote Originally Posted by wmcbrine View Post
    Unfortunately psyco only works on i386 (x86-32).
    what happens on x86_64?

  2. #22
    Join Date
    Aug 2008
    Beans
    Hidden!

    Re: Python's slow

    Quote Originally Posted by jimi_hendrix View Post
    i love C++ for somethings and python for others...

    C++ for games and python for interfacing with other things (files, IRC, etc)

    but basically unless your calculating the googleth iteration of pi i dont think you need C speed
    I take it, then, that Open Office and the GIMP are written in Python?

  3. #23
    Join Date
    Jun 2008
    Location
    Sin City
    Beans
    588
    Distro
    Ubuntu UNR

    Re: Python's slow

    Quote Originally Posted by pp. View Post
    I take it, then, that Open Office and the GIMP are written in Python?
    OOo is written in, I believe, Java and GIMP is C? GTK is C, QT is C++ if memory serves. However both implement Python as a scripting language.

    More telling, however, is that EVE-Online is written in Python.

    The position of the Python community has always been that it is better to prototype or primarily code in Python, identify bottlenecks and if needed drop down to C to speed up those portions. This approach gives you the rapid development of Python with the speed of C in the areas where it is really needed.
    Warning: Any code examples I write are probably untested and contain bugs. Do not execute directly. Look for intent, not accuracy, please!
    L.A.G. - Jobs Dissembles - 2010/4/29

  4. #24
    Join Date
    Aug 2006
    Location
    60°27'48"N 24°48'18"E
    Beans
    3,458

    Re: Python's slow

    Quote Originally Posted by Greyed View Post
    OOo is written in, I believe, Java
    C++. There are some bits and pieces of Java somewhere, IIRC in the database connection code if memory serves.
    LambdaGrok. | #ubuntu-programming on FreeNode

  5. #25
    Join Date
    Jun 2008
    Location
    Sin City
    Beans
    588
    Distro
    Ubuntu UNR

    Re: Python's slow

    Well, it feels like Java sometimes.
    Warning: Any code examples I write are probably untested and contain bugs. Do not execute directly. Look for intent, not accuracy, please!
    L.A.G. - Jobs Dissembles - 2010/4/29

  6. #26
    Join Date
    Jul 2006
    Location
    Hertfordshire
    Beans
    454
    Distro
    Kubuntu 9.04 Jaunty Jackalope

    Re: Python's slow

    Quote Originally Posted by Greyed View Post
    More telling, however, is that EVE-Online is written in Python.
    If I had a penny for every time EVE-Online was used as a poster child for Python...

  7. #27
    Join Date
    Jun 2008
    Location
    Sin City
    Beans
    588
    Distro
    Ubuntu UNR

    Re: Python's slow

    You still wouldn't be able to have enough money to hire people to invalidate the fact that it refutes the notion C++ is the only language in which to program games, amen?

    But you're right. If only someone else would develop a game in Python *cough*FretsonFire*cough* or used Python extensively *cough*Vampires: Bloodlines*cough*hack*Tabula Rasa*wheeze* we could let EVE Online off the hook a tad, right?
    Last edited by Greyed; December 15th, 2008 at 10:52 AM. Reason: Added a few examples.
    Warning: Any code examples I write are probably untested and contain bugs. Do not execute directly. Look for intent, not accuracy, please!
    L.A.G. - Jobs Dissembles - 2010/4/29

  8. #28
    Join Date
    Dec 2007
    Beans
    75

    Re: Python's slow

    Quote Originally Posted by i.mehrzad View Post
    I have heard that python is one of the slowest languages out there. Is that true. Then why is it that in ubuntuforums and everywhere there is always a propogation of this language as the easiest, most useful ...
    I do not know Python, but I have had this type of discussion many times before, only for other languages.

    When looking at speed you have to look at two things: Speed of development vs Speed of execution.
    (Generalisation)c++ will run faster than Python in most cases. But Python will develop faster than c++. (Going by all the posts of how easy a language it is to pick up and use)

    So lets say you want to write a simple calculator application. And lets assume that Python takes you 1 hour to develop said application. c++ takes you 2 hours. Now c++ calculates your sums 1/10th of a second faster.

    That means that you will have to make 36000 calculations on your calculator before you are losing time. Meaning you can almost do 100 calculations a day for a whole year before you have lost the 1 hour you gained by using Python instead of c++

    This is just a (very) simple (and generalised) example to illustrate the basics of speed and programming.

  9. #29
    Join Date
    Oct 2006
    Location
    Austin, Texas
    Beans
    2,715

    Re: Python's slow

    Quote Originally Posted by SeanHodges View Post
    If I had a penny for every time EVE-Online was used as a poster child for Python...
    Well, it's a good poster child because it counters several common misconceptions people have about Python. For instance, people think CPython IS Python, but really Python is a language, and CPython is just the most popular implementation (there's cpython/jython/ironpython/stackless python...)

    But, as far as performance in Python goes... If you've got some code where you're profiled it, exhausted all chance of clean algorithmic optimization, and the thing still wont perform fast enough... Just write that tiny chunk in a compiled language and import it into Python. Writing a module in C is just as easy as compiling a DLL (any shared library can be FFI-loaded with the ctypes module and painlessly wrapped in Python objects for convenience). You can also take the PyRex and cython approach that find a sort of middle grounds between C and Python to make writing fast modules easier. And this, of course, is still just CPython, IronPython can leverage .NET libraries, Jython can leverage Java libraries...

  10. #30
    Join Date
    Aug 2006
    Beans
    198

    Re: Python's slow

    Quote Originally Posted by Greyed View Post
    You still wouldn't be able to have enough money to hire people to invalidate the fact that it refutes the notion C++ is the only language in which to program games, amen?

    But you're right. If only someone else would develop a game in Python *cough*FretsonFire*cough* or used Python extensively *cough*Vampires: Bloodlines*cough*hack*Tabula Rasa*wheeze* we could let EVE Online off the hook a tad, right?
    Also, Civilization 4 and Oblivion (likely Fallout 3 too).

    Those are just the ones I've noticed.

Page 3 of 8 FirstFirst 12345 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •