[HN Gopher] HPy: A better C API for Python?
       ___________________________________________________________________
        
       HPy: A better C API for Python?
        
       Author : mkesper
       Score  : 127 points
       Date   : 2021-04-02 07:57 UTC (15 hours ago)
        
 (HTM) web link (lwn.net)
 (TXT) w3m dump (lwn.net)
        
       | pansa2 wrote:
       | HPy was recently discussed here:
       | https://news.ycombinator.com/item?id=26625398
        
       | JetAlone wrote:
       | I remember reading an article or two about Python being quite
       | energy inefficient as languages go, reaching very low on a chart
       | like. I don't know if and/or how much Hpy will improve this.
       | Definitely have to parrot the article and say the situation a
       | matter of "wait, keep watching and see", or better yet if you can
       | manage it, "contribute, keep contributing, and look ahead".
        
         | ketralnis wrote:
         | HPy is (sort of) a replacement for CPython's normal API for C
         | Extensions. It has nothing to do with "efficiency" or the
         | performance of python itself.
        
         | virtue3 wrote:
         | No one has ever claimed that python is energy conservative.
         | 
         | There is a general understanding that you are trading machine
         | efficiency for developer efficiency.
         | 
         | There were attempts at making it more efficient (see
         | ironpython, which is dead now).
         | 
         | If you drop a serious bottleneck of code into C you are going
         | to see massive improvements provided you don't need to marshal
         | between python/c a lot (aka, if you can dump a ton of data, do
         | a ton of work in C, then dump it back to python, you'll be
         | sitting pretty).
        
           | nullserver wrote:
           | Had to help out with some python the other day. About 15
           | years since I used python. A couple of hours to figure out
           | how to get it running locally. Then I fixed the various
           | issues. Mostly horrible performance problems.
           | 
           | All told half a day of effort.
           | 
           | Felt amazing being able to be productive so quickly on
           | ancient abandoned code. The badly written algorithm was just
           | obvious in its wrongness.
        
           | dragonwriter wrote:
           | > There were attempts at making it more efficient (see
           | ironpython, which is dead now).
           | 
           | IronPython seems to be on life support (it had a bugfix
           | release for .NET 5 late last year), and no longer an MS
           | project, but its not quite dead.
           | 
           | But pointing to IronPython alone is weird, as that was more
           | about interface woth the rest of .NET than machine
           | efficiency, and there are a number of major, live projects
           | with efficiency as one of their central goals: PyPy, mypyc,
           | Cython, for instance.
        
       ___________________________________________________________________
       (page generated 2021-04-02 23:01 UTC)