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


Groups > comp.lang.python > #87000 > unrolled thread

Re: Speeding up permutations generation

Started byWolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de>
First post2015-03-06 09:44 +0100
Last post2015-03-06 09:44 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Speeding up permutations generation Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2015-03-06 09:44 +0100

#87000 — Re: Speeding up permutations generation

FromWolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de>
Date2015-03-06 09:44 +0100
SubjectRe: Speeding up permutations generation
Message-ID<mailman.98.1425631533.21433.python-list@python.org>
On 03/06/2015 09:34 AM, Mark Lawrence wrote:
> On 06/03/2015 06:44, 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?
>>
>> ​-Abhiram.R
>> /~Never give up/
>>
>
> If there is I'd guess that you'd use numpy http://www.numpy.org/.  The
> more mathematically minded may well be able to give better answers.
>

Well, numpy would be faster if you could call into it once and retrieve 
all permutations as an array. This would allow you to do all 
calculations in C, while itertools.permutations has to jump back and 
forth between C and Pyhon code.

However, 50! is still ~ 3*10^64. So where would you want to store the 
array of these many permutations ?

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web