Slashdot Mirror


You Can Now Profile Python Using Arm Forge (arm.com)

Python "is often described as being slow when it comes to performance... But is that truly the case?" writes Patrick Wohlschlegel, Arm's senior product manager for infrastructure and high-performance computing tools.

Slashdot reader igor.sfiligoi writes: Effectively profiling Python has always been a pain. Arm recently announced that their Arm Forge is now able to profile both Python and compiled code.
It's available for any hardware architecture, Wohlschlegel writes, adding that developers "typically assume that most of the execution time is spent in compiled, optimized C/C++ or Fortran libraries (e.g. NumPy) which are called from Python..."

"How confident are you that your application is not wasting your precious computing resources for the wrong reasons?"

13 of 103 comments (clear)

  1. Slashvertisement by ceoyoyo · · Score: 4, Informative

    You're supposed to mark the sponsored content....

    1. Re: Slashvertisement by ceoyoyo · · Score: 2, Informative

      Itâ(TM)s not even an innovative product. Python comes with two different profilers, and thereâ(TM)s a plethora of other profilers and guis that work with it.

      Also, the summary itself is largely excerpts from said sales pitch.

  2. It's slow by phantomfive · · Score: 2

    Python "is often described as being slow when it comes to performance... But is that truly the case?"

    Yes, in fact yes, it is. That is not why we use Python.

    --
    "First they came for the slanderers and i said nothing."
    1. Re:It's slow by DCFusor · · Score: 2

      I think the idea here was to find out how much time you spent in slow python vs the more-native compiled libraries you call from it? I know I do that with perl, and with the right division of work, it flies. Because then you can get the best of both worlds - the glue can be quick to write - faster programmer, and the hard number crunching can be fast to run - those compiled libraries. You don't thunk out to them for silly stuff like adding two numbers, but when things get hairy, the price of the thunk (interface layer for you kids) is way worth it, and the time doing user-fiddly stuff in the higher level interpreted language is relatively nil anyway.
      And yeah, slashvertisement, but we can have a discussion anyway.

      --
      Why guess when you can know? Measure!
    2. Re:It's slow by DCFusor · · Score: 2

      Yep, they are, and "reading comprehension required" - I'm not asking them to eval code at runtime, either. They are already well-defined and do what they do. My plotting tool needs the ability for the researcher to ask for things - axis mappings from one or more data sources - the programmer could not anticipate, and whatever the language, Glade, Gnuplot, and perl itself are all written in C - but, and this is important - I didn't have to do it.
      This is for parameter sweeping a fusion reactor I'm working with, and for example, fusions/second is a cool thing to know vs all the other parameters, but so is "output vs input" for both scientific and real world breakthrough Q calculations. Since I'm also doing ion trap kinds of things, the RF frequencies, levels, DC biases, you name it, all might want to be plotted vs "how well did that work" so I can run all day, then interpret data all night. Without having to drop back into programming at all, other than to select presets and once in awhile set up a new one. If you care, you can see an example of the resulting GUI and some data here: http://www.coultersmithing.com...

      --
      Why guess when you can know? Measure!
  3. Can we quit with the myth that Python is slow ? by Btrot69 · · Score: 4, Funny

    Python programs that I wrote 15 years ago are still running in production.

    The "Java rewrite" that my manager wanted to do never got done.
    In fact, a lot of the production Java code that existed back then couldn't be maintained and got reimplemented in Python.

    Since the new servers are ~20 times faster, speed never really mattered anyway.

    Python is full of "free" optimizations that most newbys are not even aware of.

    When you learn to do things that "Pythonic" way, it really does put the clunky Java hack-jobs to shame.

    Here another take on it:
    https://www.pythonforengineers...

    1. Re:Can we quit with the myth that Python is slow ? by DCFusor · · Score: 2

      Of course. For things that really don't have to do much, scripting languages are fine, and newer or more extendable ones tend to be a little quicker than the older ones, maybe.
      But some people are trying to use scripting languages to do *REAL WORK*, not serving web pages, but say, number crunching....and then, the ability to profile and know when to call out to something more efficient does matter, no matter which fractal of bad design you're using for scripting.

      --
      Why guess when you can know? Measure!
    2. Re:Can we quit with the myth that Python is slow ? by Hognoxious · · Score: 5, Funny

      Python programs that I wrote 15 years ago are still running in production.

      If you'd written them in C they'd have finished by now.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    3. Re:Can we quit with the myth that Python is slow ? by Chatterton · · Score: 2

      What could be that unicorn real work number crunching application that couldn't be written in 1/10 of lines of code of python in some numpy with a pinch of DAAL or tensorflow? Why most AI research who is not know to be low on the number crunching departement is done in Python?
      There is even Games developped in Python (Sims 4, Eve Online, Civilisation IV, Pirates of the Caribbean Online...).

      In my career, I have written my share of Assembly and C code for performance reasons when a 486 DX 400 was the must have of the shinny machines. But now, compilers and 'interpreters' can do a better work than I due to the complexity of the processors and their different caches sizes. Right now you can write some highly optimized assembly code that work at nearly the theorical speed limit of a processor with a specific cache size, but who will work like a molasse on a similar architecture with double the cache size. An interpreter could adapt its realtime compilation to the architecture it run on and even for the same algorithm to the type of data you process.

      Now, if your Python program is still too slow, you can update your slowest function into cython and compile it to have a speed boost that C can get you without losing the time needed to develop everything in C and by that saving a lot of time to go to the next project.

      In the beginning of my carreer, I would have used the best language for the job from a toolbelt composed of Assembly, C/C++, Fortran, Delphi, Lisp and Prolog. Now, I use most exclusively Python for my projects.

    4. Re:Can we quit with the myth that Python is slow ? by putaro · · Score: 2

      It's not a myth. Python is slow. You may choose to take that as a trade-off and that's fine.

  4. Is it by eneville · · Score: 2

    Is it that slow? pypy seems pretty quick to me. Do programs start up that frequently these days outside of util scripts? Even then you can follow xargs lead and do more per execution.

  5. Finally! Devel::NYTProf equiv? by sweet+'n+sour · · Score: 2

    Upon entering the job market recently, I discovered that no one wants Perl programmers anymore, it's all Python.

    After learning the differences in Python (and learning that I'd need to learn both v2 and v3), I started hunting for some of the tools that I use for Perl, like a profiler.

    I couldn't find anything that could touch Devel::NYTProf. (Demo of that here) Hopefully this can??

  6. Performs better than PowerShell by gabrieltss · · Score: 2

    I replace ALL my PowerShell scripts on my widows servers with Python ones. Why it performed 10 times better!

    --
    The Truth is a Virus!!!