Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #21476

Re: Porting the 2-3 heap data-structure library from C to Python

From Terry Reedy <tjreedy@udel.edu>
Subject Re: Porting the 2-3 heap data-structure library from C to Python
Date 2012-03-10 21:17 -0500
References <mailman.465.1331130346.3037.python-list@python.org> <87boo89zul.fsf@xemacs.org> <mailman.473.1331137103.3037.python-list@python.org> <87399gne30.fsf@xemacs.org>
Newsgroups comp.lang.python
Message-ID <mailman.555.1331432260.3037.python-list@python.org> (permalink)

Show all headers | View raw


On 3/10/2012 8:03 PM, Hrvoje Niksic wrote:
> Stefan Behnel<stefan_ml@behnel.de>  writes:
>
>>> which is the standard way of extending Python with high-performance
>>> (and/or system-specific) C code.
>>
>> Well, it's *one* way.  Certainly not the easiest way, neither the most
>> portable and you'll have a hard time making it the fastest.
>
> I didn't say it was easy, but standard, in the sense of documented in
> Python documentation.  Python/C is as portable as Python itself, and as

Python is portable because a *lot* of work has gone and continues to go 
into making it so. And because it sticks with the lowest common 
denominator of C89. There is much system or compiler specific code in 
#ifdefs. There are over 60 buildbots for testing patches on various 
hardware-os-compiler-(python)version combinations. Perhaps once a week 
something does not work on one of them. The patch gets revised. It 
happened just today.

Apple is changing compilers for the Mac; Python initially did not build 
with the new compiler. Some people had to do some work so there would 
continue to be Python on the Mac. So I can imagine that Cython *might* 
shield one from some of the very real portability problems.

> fast as the platform allows.  I understand your desire to promote
> Cython, but please stop resorting to FUD in doing so.

You admitted it might be easier. Portability is plausible. So I think 
that a bit harsh.

-- 
Terry Jan Reedy

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Porting the 2-3 heap data-structure library from C to Python Alec Taylor <alec.taylor6@gmail.com> - 2012-03-08 01:25 +1100
  Re: Porting the 2-3 heap data-structure library from C to Python Hrvoje Niksic <hniksic@xemacs.org> - 2012-03-07 16:48 +0100
    Re: Porting the 2-3 heap data-structure library from C to Python Stefan Behnel <stefan_ml@behnel.de> - 2012-03-07 17:18 +0100
      Re: Porting the 2-3 heap data-structure library from C to Python Hrvoje Niksic <hniksic@xemacs.org> - 2012-03-11 02:03 +0100
        Re: Porting the 2-3 heap data-structure library from C to Python Terry Reedy <tjreedy@udel.edu> - 2012-03-10 21:17 -0500
        Re: Porting the 2-3 heap data-structure library from C to Python Stefan Behnel <stefan_ml@behnel.de> - 2012-03-11 08:41 +0100

csiph-web