About Cython

34 views
Skip to first unread message

Cédric Krier

unread,
Oct 17, 2014, 4:11:57 AM10/17/14
to python-sql
Hi,

Following this request [1], I was wondering of someone had some
experience about Cython. Do you think Cython support will improve
python-sql? Because my quick test doesn't seem to show any improvement
(simple convertion to C and running the tests).


[1] https://code.google.com/p/python-sql/issues/detail?id=25

--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

John Lee

unread,
Oct 24, 2014, 11:16:39 AM10/24/14
to pytho...@googlegroups.com
Hi Cédric,

I've tried to make some code partial rewritten with "cdef",
but sadly it becomes more slow(I guess it make some convert between C String <-> Python String type

I'll keep trying about this rewrite work, maybe write all the code which use the String operations...

BTW, is there any repository of this project on the Github?
It seems more convenient to do code review & make new forks...:P

John

Cédric Krier

unread,
Oct 24, 2014, 12:07:18 PM10/24/14
to pytho...@googlegroups.com
On 24 Oct 08:16, John Lee wrote:
> Hi Cédric,
>
> I've tried to make some code partial rewritten with "cdef",
> but sadly it becomes more slow(I guess it make some convert between C
> String <-> Python String type

Yes python-sql is mainly about concatenating strings so I don't know if
Cython is relevant.

> I'll keep trying about this rewrite work, maybe write all the code which
> use the String operations...

It will be great to show your work.

> BTW, is there any repository of this project on the Github?

No.

> It seems more convenient to do code review & make new forks...:P

You can create a clone at
https://code.google.com/p/python-sql/source/clones

Cédric Krier

unread,
Oct 25, 2014, 8:36:37 AM10/25/14
to python-sql
On 17 Oct 10:11, Cédric Krier wrote:
> Hi,
>
> Following this request [1], I was wondering of someone had some
> experience about Cython. Do you think Cython support will improve
> python-sql? Because my quick test doesn't seem to show any improvement
> (simple convertion to C and running the tests).
>
>
> [1] https://code.google.com/p/python-sql/issues/detail?id=25

I think if we try to improve python-sql performance we need a common
benchmark to measure improvements.
So I write this simple script that uses timeit.
What do you think?
benchmark.py
Reply all
Reply to author
Forward
0 new messages