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


Groups > comp.lang.python > #2583

Re: integer multiplication

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!goblin1!goblin.stu.neva.ru!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.85.MISMATCH!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; '2.7': 0.05; 'int': 0.05; 'terry': 0.07; '3.x': 0.09; 'compares': 0.09; 'internally': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'rejected.': 0.09; 'substitute': 0.09; 'pm,': 0.11; 'am,': 0.14; 'wrote:': 0.14; 'reedy': 0.16; 'meant': 0.18; 'jan': 0.22; 'header:In-Reply- To:1': 0.22; 'mon,': 0.22; 'curious': 0.23; 'expense': 0.23; 'retaining': 0.23; "i'll": 0.26; 'up.': 0.30; 'implement': 0.30; 'kicks': 0.31; 'types.': 0.31; 'separate': 0.31; 'to:addr:python- list': 0.32; 'bit': 0.33; 'header:X-Complaints-To:1': 0.34; 'there': 0.35; 'question': 0.35; 'header:User-Agent:1': 0.35; 'overhead': 0.35; 'considered': 0.36; 'data': 0.37; 'two': 0.37; 'machine': 0.37; 'issue': 0.37; 'apr': 0.38; 'but': 0.38; 'received:org': 0.38; 'to:addr:python.org': 0.39; 'could': 0.39; 'header:Mime-Version:1': 0.39; 'how': 0.39; 'header:Received:5': 0.40; '2011': 0.62; 'making': 0.62; 'believe': 0.66; 'grade': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Terry Reedy <tjreedy@udel.edu>
Subject Re: integer multiplication
Date Mon, 04 Apr 2011 15:04:32 -0400
References <BANLkTik5Oq0AE5-yrbSa2oES5_g8+gspeA@mail.gmail.com> <mailman.177.1301880825.2990.python-list@python.org> <7xy63qpnrh.fsf@ruckus.brouhaha.com> <incsbs$6b9$1@dough.gmane.org> <AANLkTimZ3Upjg29sS63_cFaRX9fvz-xKt3e+i2aLm+6U@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host rain.gmane.org
User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9
In-Reply-To <AANLkTimZ3Upjg29sS63_cFaRX9fvz-xKt3e+i2aLm+6U@mail.gmail.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.16.1301943893.9059.python-list@python.org> (permalink)
Lines 25
NNTP-Posting-Host 82.94.164.166
X-Trace 1301943893 news.xs4all.nl 81476 [::ffff:82.94.164.166]:59786
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:2583

Show key headers only | View raw


On 4/4/2011 1:20 PM, geremy condra wrote:
> On Mon, Apr 4, 2011 at 9:41 AM, Terry Reedy<tjreedy@udel.edu>  wrote:

>> (I believe that retaining two implementations internally was considered but
>> rejected. Could be wrong.)
>
> There are two implementations, grade school multiplication and
> karatsuba, which kicks in after a given cutoff.

I meant internally retaining the 2.7 machine int and unbounded long types.

>> I am curious how gmpy compares to 3.x ints (longs) with small number
>> calculations like 3+5 or 3*5.
>
> I have this data somewhere, if you're interested I'll try to dredge it up.

My question is whether gmpy ints could be a complete substitute for 3.x 
ints, or whether speed for bit (1000 digit) ints came at the expense of 
extra overhead making small int calculations slower. That is separate 
from the issue of whether gmpy ints implement the entire int interface, 
or whether they currently inter-operate with other types as well.

-- 
Terry Jan Reedy

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


Thread

Re: integer multiplication geremy condra <debatem1@gmail.com> - 2011-04-03 18:33 -0700
  Re: integer multiplication Paul Rubin <no.email@nospam.invalid> - 2011-04-03 22:51 -0700
    Re: integer multiplication Terry Reedy <tjreedy@udel.edu> - 2011-04-04 12:41 -0400
      Re: integer multiplication casevh <casevh@gmail.com> - 2011-04-04 12:18 -0700
    Re: integer multiplication geremy condra <debatem1@gmail.com> - 2011-04-04 10:20 -0700
    Re: integer multiplication Terry Reedy <tjreedy@udel.edu> - 2011-04-04 15:04 -0400

csiph-web