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


Groups > comp.lang.python > #41836

Re: Performance of int/long in Python 3

Date 2013-03-25 16:16 -0700
From Ethan Furman <ethan@stoneleaf.us>
Subject Re: Performance of int/long in Python 3
References <CAPTjJmouUzXNr4Oq==LYB1UZ2UQb13Y6vTHGGzuzNXorNthjYg@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.3705.1364253727.2939.python-list@python.org> (permalink)

Show all headers | View raw


On 03/25/2013 02:51 PM, Chris Angelico wrote:
> Python 3's int is faster than Python 2's long, but slower than Python
> 2's int. So the question really is, would a two-form representation be
> beneficial, and if so, is it worth the coding trouble?

I'm inclined to say it's not worth the trouble.  If you're working with numbers, and speed is an issue, you really 
should be using one of the numeric or scientific packages out there.

--
~Ethan~

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


Thread

Re: Performance of int/long in Python 3 Ethan Furman <ethan@stoneleaf.us> - 2013-03-25 16:16 -0700
  Re: Performance of int/long in Python 3 Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-03-26 00:17 +0000
    Re: Performance of int/long in Python 3 Chris Angelico <rosuav@gmail.com> - 2013-03-26 11:28 +1100
    Re: Performance of int/long in Python 3 Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-03-26 00:49 +0000
    Re: Performance of int/long in Python 3 Roy Smith <roy@panix.com> - 2013-03-25 20:55 -0400
      Re: Performance of int/long in Python 3 Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-03-26 05:01 +0000
        Re: Performance of int/long in Python 3 Chris Angelico <rosuav@gmail.com> - 2013-03-26 17:12 +1100
        Re: Performance of int/long in Python 3 Roy Smith <roy@panix.com> - 2013-03-26 09:18 -0400

csiph-web