Dag Sverre Seljebotn | 31 May 2012 16:04
Picon
Picon
Gravatar

[Cython] SEP 201 draft: Native callable objects

[Discussion on numfocus@... please]

I've uploaded a draft-state SEP 201 (previously CEP 1000):

https://github.com/numfocus/sep/blob/master/sep201.rst

"""
Many callable objects are simply wrappers around native code. This holds 
for any Cython function, f2py functions, manually written CPython 
extensions, Numba, etc.

Obviously, when native code calls other native code, it would be nice to 
skip the significant cost of boxing and unboxing all the arguments.
"""

The thread about this on the Cython list is almost endless:

http://thread.gmane.org/gmane.comp.python.cython.devel/13416/focus=13443

There was a long discussion on the key-comparison vs. interned-string 
approach. I've written both up in SEP 201 since it was the major point 
of contention. There was some benchmarks starting here:

http://thread.gmane.org/gmane.comp.python.cython.devel/13416/focus=13443

And why provide a table and not a get_function_pointer starting here:

http://thread.gmane.org/gmane.comp.python.cython.devel/13416/focus=13443

For those who followed that and don't want to read the entire spec, the 
(Continue reading)

Robert Bradshaw | 31 May 2012 20:50
Picon

Re: [Cython] SEP 201 draft: Native callable objects

On Thu, May 31, 2012 at 7:04 AM, Dag Sverre Seljebotn
<d.s.seljebotn@...> wrote:
> [Discussion on numfocus@... please]
>
> I've uploaded a draft-state SEP 201 (previously CEP 1000):
>
> https://github.com/numfocus/sep/blob/master/sep201.rst
>
> """
> Many callable objects are simply wrappers around native code. This holds for
> any Cython function, f2py functions, manually written CPython extensions,
> Numba, etc.
>
> Obviously, when native code calls other native code, it would be nice to
> skip the significant cost of boxing and unboxing all the arguments.
> """
>
>
> The thread about this on the Cython list is almost endless:
>
> http://thread.gmane.org/gmane.comp.python.cython.devel/13416/focus=13443
>
> There was a long discussion on the key-comparison vs. interned-string
> approach. I've written both up in SEP 201 since it was the major point of
> contention. There was some benchmarks starting here:
>
> http://thread.gmane.org/gmane.comp.python.cython.devel/13416/focus=13443
>
> And why provide a table and not a get_function_pointer starting here:
>
(Continue reading)

Robert Bradshaw | 31 May 2012 20:57
Picon

Re: [Cython] SEP 201 draft: Native callable objects

On this note, a global string interning mechanism is likely to be of
interest beyond just native callable objects, so could be worth
separating out into a separate spec.

On Thu, May 31, 2012 at 11:50 AM, Robert Bradshaw <robertwb@...> wrote:
> On Thu, May 31, 2012 at 7:04 AM, Dag Sverre Seljebotn
> <d.s.seljebotn@...> wrote:
>> [Discussion on numfocus@... please]
>>
>> I've uploaded a draft-state SEP 201 (previously CEP 1000):
>>
>> https://github.com/numfocus/sep/blob/master/sep201.rst
>>
>> """
>> Many callable objects are simply wrappers around native code. This holds for
>> any Cython function, f2py functions, manually written CPython extensions,
>> Numba, etc.
>>
>> Obviously, when native code calls other native code, it would be nice to
>> skip the significant cost of boxing and unboxing all the arguments.
>> """
>>
>>
>> The thread about this on the Cython list is almost endless:
>>
>> http://thread.gmane.org/gmane.comp.python.cython.devel/13416/focus=13443
>>
>> There was a long discussion on the key-comparison vs. interned-string
>> approach. I've written both up in SEP 201 since it was the major point of
>> contention. There was some benchmarks starting here:
(Continue reading)

Dag Sverre Seljebotn | 31 May 2012 21:29
Picon
Picon
Gravatar

Re: [Cython] SEP 201 draft: Native callable objects

On 05/31/2012 08:50 PM, Robert Bradshaw wrote:
> On Thu, May 31, 2012 at 7:04 AM, Dag Sverre Seljebotn
> <d.s.seljebotn@...>  wrote:
>> [Discussion on numfocus@... please]
>>
>> I've uploaded a draft-state SEP 201 (previously CEP 1000):
>>
>> https://github.com/numfocus/sep/blob/master/sep201.rst
>>
>> """
>> Many callable objects are simply wrappers around native code. This holds for
>> any Cython function, f2py functions, manually written CPython extensions,
>> Numba, etc.
>>
>> Obviously, when native code calls other native code, it would be nice to
>> skip the significant cost of boxing and unboxing all the arguments.
>> """
>>
>>
>> The thread about this on the Cython list is almost endless:
>>
>> http://thread.gmane.org/gmane.comp.python.cython.devel/13416/focus=13443
>>
>> There was a long discussion on the key-comparison vs. interned-string
>> approach. I've written both up in SEP 201 since it was the major point of
>> contention. There was some benchmarks starting here:
>>
>> http://thread.gmane.org/gmane.comp.python.cython.devel/13416/focus=13443
>>
>> And why provide a table and not a get_function_pointer starting here:
(Continue reading)

Robert Bradshaw | 31 May 2012 22:13
Picon

Re: [Cython] SEP 201 draft: Native callable objects

On Thu, May 31, 2012 at 12:29 PM, Dag Sverre Seljebotn
<d.s.seljebotn <at> astro.uio.no> wrote:
> On 05/31/2012 08:50 PM, Robert Bradshaw wrote:
>>
>> On Thu, May 31, 2012 at 7:04 AM, Dag Sverre Seljebotn
>> <d.s.seljebotn <at> astro.uio.no>  wrote:
>>>
>>> [Discussion on numfocus <at> googlegroups.com please]
>>>
>>> I've uploaded a draft-state SEP 201 (previously CEP 1000):
>>>
>>> https://github.com/numfocus/sep/blob/master/sep201.rst
>>>
>>> """
>>> Many callable objects are simply wrappers around native code. This holds
>>> for
>>> any Cython function, f2py functions, manually written CPython extensions,
>>> Numba, etc.
>>>
>>> Obviously, when native code calls other native code, it would be nice to
>>> skip the significant cost of boxing and unboxing all the arguments.
>>> """
>>>
>>>
>>> The thread about this on the Cython list is almost endless:
>>>
>>> http://thread.gmane.org/gmane.comp.python.cython.devel/13416/focus=13443
>>>
>>> There was a long discussion on the key-comparison vs. interned-string
>>> approach. I've written both up in SEP 201 since it was the major point of
(Continue reading)

Dag Sverre Seljebotn | 1 Jun 2012 15:49
Picon
Picon
Gravatar

Re: [Cython] SEP 201 draft: Native callable objects

On 05/31/2012 10:13 PM, Robert Bradshaw wrote:
> On Thu, May 31, 2012 at 12:29 PM, Dag Sverre Seljebotn
> <d.s.seljebotn@...>  wrote:
>> On 05/31/2012 08:50 PM, Robert Bradshaw wrote:
>>>
>>> On Thu, May 31, 2012 at 7:04 AM, Dag Sverre Seljebotn
>>> <d.s.seljebotn@...>    wrote:
>>>>
>>>> [Discussion on numfocus@... please]
>>>>
>>>> I've uploaded a draft-state SEP 201 (previously CEP 1000):
>>>>
>>>> https://github.com/numfocus/sep/blob/master/sep201.rst
>>>>
>>>> """
>>>> Many callable objects are simply wrappers around native code. This holds
>>>> for
>>>> any Cython function, f2py functions, manually written CPython extensions,
>>>> Numba, etc.
>>>>
>>>> Obviously, when native code calls other native code, it would be nice to
>>>> skip the significant cost of boxing and unboxing all the arguments.
>>>> """
>>>>
>>>>
>>>> The thread about this on the Cython list is almost endless:
>>>>
>>>> http://thread.gmane.org/gmane.comp.python.cython.devel/13416/focus=13443
>>>>
>>>> There was a long discussion on the key-comparison vs. interned-string
(Continue reading)

Dag Sverre Seljebotn | 1 Jun 2012 16:25
Picon
Picon
Gravatar

Re: [Cython] SEP 201 draft: Native callable objects

On 06/01/2012 03:49 PM, Dag Sverre Seljebotn wrote:
> On 05/31/2012 10:13 PM, Robert Bradshaw wrote:
>> On Thu, May 31, 2012 at 12:29 PM, Dag Sverre Seljebotn
>> <d.s.seljebotn@...> wrote:
>>> On 05/31/2012 08:50 PM, Robert Bradshaw wrote:
>>>>
>>>> On Thu, May 31, 2012 at 7:04 AM, Dag Sverre Seljebotn
>>>> <d.s.seljebotn@...> wrote:
>>>>>
>>>>> [Discussion on numfocus@... please]
>>>>>
>>>>> I've uploaded a draft-state SEP 201 (previously CEP 1000):
>>>>>
>>>>> https://github.com/numfocus/sep/blob/master/sep201.rst
>>>>>
>>>>> """
>>>>> Many callable objects are simply wrappers around native code. This
>>>>> holds
>>>>> for
>>>>> any Cython function, f2py functions, manually written CPython
>>>>> extensions,
>>>>> Numba, etc.
>>>>>
>>>>> Obviously, when native code calls other native code, it would be
>>>>> nice to
>>>>> skip the significant cost of boxing and unboxing all the arguments.
>>>>> """
>>>>>
>>>>>
>>>>> The thread about this on the Cython list is almost endless:
(Continue reading)


Gmane