Slash Boxes

SoylentNews is people

SoylentNews is powered by your submissions, so send in your scoop. Only 9 submissions in the queue.
posted by n1 on Tuesday May 13 2014, @01:11AM   Printer-friendly
from the it's-dark-in-here dept.

We all know that python is slower than compiled languages like C. But what can you do about it? Jake VanderPlas, director of research in the physical sciences for the university of Washington's eScience institute, digs into python's internals to explain how it works and what program design choices you can make to use python efficiently.

This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 3, Interesting) by hankwang on Tuesday May 13 2014, @09:00AM

    by hankwang (100) on Tuesday May 13 2014, @09:00AM (#42603) Homepage

    One problem of Python that I didn't see mentioned is that of parallellization to make use of multiple cores. See Jeff Knupp, Python's Hardest Problem [] for a thorough explanation.

    TL;DR: a fundamental issue with the Python interpreter is that it is not suitable for parallel execution. Only data crunching that does not involve running the interpreter (e.g., data crunching by compiled code) can be executed effectively in parallel.

    Starting Score:    1  point
    Moderation   +1  
       Interesting=1, Total=1
    Extra 'Interesting' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   3  
  • (Score: 3, Informative) by skullz on Tuesday May 13 2014, @04:39PM

    by skullz (2532) on Tuesday May 13 2014, @04:39PM (#42799)

    This really is the largest problem with the CPython implementation. The JIL doesn't exist in Jython and I don't think in IronPython (.NET) but lingers on in the C interpreter.

    The Multiprocessing package gets around this by spawning a real live Python process and then lets the OS handle the parallelism and that works very well. Python doesn't yet have a nice proper threading package without the lock.