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


Groups > comp.lang.python > #87015

Re: Speeding up permutations generation

Date 2015-03-06 06:29 -0500
From Dave Angel <davea@davea.name>
Subject Re: Speeding up permutations generation
References <CADgpKWb=q2=YEJSS1yRkgzF37nO5BNRnywm+zhcwF-MAOr6MdA@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.106.1425641363.21433.python-list@python.org> (permalink)

Show all headers | View raw


On 03/06/2015 01:44 AM, Abhiram R wrote:
> Hi all,
> Is there a way to generate permutations of large arrays of sizes say,in the
> hundreds, faster than in the time itertools.permutations() can return?
>

When dealing with large loops like that (or even permutations of 50, 
which is also gy-normous [1]), you have to consider what work you plan 
to do in the loop.

Even if the generation were instantaneous, you still presumably are 
going to have some code in the loop.

If you expect to do it on a set of 50, you're going to have to narrow 
down the possibilities with some approach other than brute force.

What's the problem you were hoping to solve in the next trillion years?


[1]  50! = 
30414093201713378043612608166064768844377641568960512000000000000L


-- 
DaveA

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


Thread

Re: Speeding up permutations generation Dave Angel <davea@davea.name> - 2015-03-06 06:29 -0500

csiph-web