Stories
Slash Boxes
Comments

SoylentNews is people

SoylentNews is powered by your submissions, so send in your scoop. Only 14 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: 4, Informative) by physicsmajor on Tuesday May 13 2014, @03:11AM

    by physicsmajor (1471) on Tuesday May 13 2014, @03:11AM (#42515)

    For good reason.

    The same reasons, in fact, why you don't waste time optimizing an inefficient string processing routine which, when you profile, gets used 0.01% of your runtime. To turn that around: if Python lets your team hack out 80% of your application in 5% of the time, thanks to these features, that is an obvious massive win.

    In my experience (warning: Python dev, I'm biased but also not sugarcoating) this is true. Python results in clearer, easier to maintain code. When I need serious performance there's always Cython or the various methods to hook into lower level libraries, but the remaining >= 80% of the time using Python was a clear and objective win for efficiency and maintainability.

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

    Total Score:   4  
  • (Score: 2) by kaszz on Tuesday May 13 2014, @04:01AM

    by kaszz (4211) on Tuesday May 13 2014, @04:01AM (#42530) Journal

    Dito for Perl. What I really like is the powerful and easy pattern matching capability. One can mix huge binaries with bit operations and laissez faires operands that stretch arithmetic to string matching without boundaries.

    As always if you code to shoot yourself in the foot. The code will deliver your misery.

    • (Score: 2) by Nerdfest on Tuesday May 13 2014, @10:56AM

      by Nerdfest (80) on Tuesday May 13 2014, @10:56AM (#42626)

      Clear, easy to maintain Python code? So, you're the guy.

      • (Score: 2) by Nerdfest on Tuesday May 13 2014, @10:58AM

        by Nerdfest (80) on Tuesday May 13 2014, @10:58AM (#42631)

        Damn, meant perl code. Doh.