On 07/16/2012 11:56 PM, Andreas Mueller wrote:
> On 07/17/2012 07:40 AM, Olivier Grisel wrote:
>> 2012/7/16 Andreas Mueller <[email protected]>:
>>> On 07/16/2012 09:55 PM, Gael Varoquaux wrote:
>>>> On Mon, Jul 16, 2012 at 01:13:55PM -0700, Jake Vanderplas wrote:
>>>>> How do folks feel about using this sort of bleeding-edge cython syntax
>>>>> in scikit-learn?
>>>> I wouldn't mind waiting another year: it's not like we don't have plenty
>>>> of things to do, and there is no urgency.
>>>>
>>>> That's my typical response of the guy who is advert to risk :). What do
>>>> others think?
>>>>
>>> First, I'd like some benchmarks.
>>> The functionality is marked as "experimental", which probably means
>>> we should wait.
>>>
>>> Third, if they are as fast as the pointer stuff we are doing right now,
>>> then we should probably switch all the code to the new interface.
>>> That seems like a lot of work. As Gael said, there is already
>>> quite a lot to do.
>> Still for new code I think it's better to use memoryviews rather than
>> manual pointer manipulation that is prone to segfaulting. Also the
>> code is cleaner and you can use syntactic sugar for many numpy-style
>> operations on raw buffers (without the numpy python object calls
>> overhead).
>>
> Do you know of any benchmarks?
>

I created some simple benchmark comparison scripts here:

https://github.com/jakevdp/memview_benchmarks

The short story is: it looks like memviews are an order of magnitude 
faster than the old numpy+cython tricks for these slicing operations, 
but raw pointers are an order of magnitude faster than memviews.

I put this together really quickly this morning - let me know if you see 
anything I missed that makes the comparisons unfair.
    Jake

> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Scikit-learn-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to