Re: New module (written in C) for using the high-precision QD library

2015-08-01 Thread baruchel
Hi, Thank you for your answer. Actually this is the third version I am writing for using the QD library; the first onPython using ctypes; the second one was in Cython; this one is in C. I don't claim being a Cython expert and maybe my Cython code was not optimal but I can say the C version is s

Re: New module (written in C) for using the high-precision QD library

2015-07-31 Thread Stefan Behnel
Chris Angelico schrieb am 31.07.2015 um 09:37: > On Fri, Jul 31, 2015 at 5:26 PM, Stefan Behnel wrote: >> Your C code seems to be only about 1500 lines, not too late to translate >> it. That should save you a couple of hundred lines and at the same time >> make it work with Python 3 (which it curre

Re: New module (written in C) for using the high-precision QD library

2015-07-31 Thread Chris Angelico
On Fri, Jul 31, 2015 at 5:26 PM, Stefan Behnel wrote: > Your C code seems to be only about 1500 lines, not too late to translate > it. That should save you a couple of hundred lines and at the same time > make it work with Python 3 (which it currently doesn't, from what I see). I was just looking

Re: New module (written in C) for using the high-precision QD library

2015-07-31 Thread Stefan Behnel
baruc...@gmail.com schrieb am 30.07.2015 um 22:09: > It is written in pure C with the CPython C-API in order to get the highest > possible speed. This is a common fallacy. Cython should still be able to squeeze another bit of performance out of your wrapper for you. It tends to know the C-API bet

New module (written in C) for using the high-precision QD library

2015-07-30 Thread baruchel
Hi, I wrote a module for wrapping the well-known high-precision QD library written by D.H. Bailey. You can find it here: https://github.com/baruchel/qd It is written in pure C with the CPython C-API in order to get the highest possible speed. The QD library provides floating number types for ~