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


Groups > comp.lang.python > #94802

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

Path csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'cpython': 0.05; 'lines,': 0.05; 'think,': 0.05; 'wrapper': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:library': 0.09; 'subject:module': 0.09; 'subject:using': 0.09; 'tends': 0.09; 'python': 0.10; 'translate': 0.15; 'from:addr:behnel.de': 0.16; 'from:addr:stefan_ml': 0.16; 'from:name:stefan behnel': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'stefan': 0.18; 'bit': 0.23; 'seems': 0.23; 'written': 0.24; 'header:In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; '(which': 0.26; 'header:X-Complaints-To:1': 0.26; 'code': 0.30; 'another': 0.32; 'subject:) ': 0.32; 'common': 0.33; 'too': 0.36; 'should': 0.36; 'lines': 0.36; 'possible': 0.36; 'to:addr:python- list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'things': 0.38; 'late': 0.38; 'does': 0.39; 'subject:the': 0.39; 'subject:-': 0.39; 'to:addr:python.org': 0.40; 'still': 0.40; 'received:de': 0.40; 'save': 0.60; 'your': 0.60; 'email addr:gmail.com': 0.62; 'you.': 0.64; '1500': 0.91; 'safer': 0.91; 'hundred': 0.96
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Stefan Behnel <stefan_ml@behnel.de>
Subject Re: New module (written in C) for using the high-precision QD library
Date Fri, 31 Jul 2015 09:26:41 +0200
References <3015c193-3a3f-468a-b998-94f77066febe@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host ipservice-092-211-032-087.092.211.pools.vodafone-ip.de
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0
In-Reply-To <3015c193-3a3f-468a-b998-94f77066febe@googlegroups.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1108.1438327616.3674.python-list@python.org> (permalink)
Lines 15
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1438327616 news.xs4all.nl 2890 [2001:888:2000:d::a6]:52154
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:94802

Show key headers only | View raw


baruchel@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
better than you would think, and it does things for you that you would
never do in C. It also helps in keeping your code safer and easier to maintain.

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).

Stefan

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


Thread

New module (written in C) for using the high-precision QD library baruchel@gmail.com - 2015-07-30 13:09 -0700
  Re: New module (written in C) for using the high-precision QD library Stefan Behnel <stefan_ml@behnel.de> - 2015-07-31 09:26 +0200
    Re: New module (written in C) for using the high-precision QD library baruchel@gmail.com - 2015-08-01 03:07 -0700
  Re: New module (written in C) for using the high-precision QD library Chris Angelico <rosuav@gmail.com> - 2015-07-31 17:37 +1000
  Re: New module (written in C) for using the high-precision QD library Stefan Behnel <stefan_ml@behnel.de> - 2015-07-31 10:40 +0200

csiph-web