On Mon, 28 Jul 2008 16:48:28 +0200, Suresh Pillai wrote:
Okay, please consider this my one absolutely stupid post for the year.
I'd like to pretend it never happened but unfortunately the web doesn't
allow that. Having never used sets, I unfort read something that lead
to it, but ...
Okay
On Fri, 25 Jul 2008 08:08:57 -0700, Iain King wrote:
On Jul 25, 3:39 pm, Suresh Pillai [EMAIL PROTECTED] wrote:
That's a good comparison for the general question I posed. Thanks.
Although I do believe lists are less than ideal here and a different
data structure should be used.
To be more
On Fri, 25 Jul 2008 05:46:56 -0700, Iain King wrote:
or 3. build a new list every iteration intead of deleting from the old
one:
while processing:
new_off_list = []
for x in off_list:
if goes_on(x):
on_list.append(x)
else:
On Mon, 28 Jul 2008 10:44:18 +0200, Suresh Pillai wrote:
Since I am doing A LOT of loops over the nodes and the number of nodes
is also huge, my concern using sets is that in order to iterate over the
set in each step of my simulation, the set items need to be converted to
a list every time
On Mon, 28 Jul 2008 15:04:43 +0200, Suresh Pillai wrote:
On Mon, 28 Jul 2008 10:44:18 +0200, Suresh Pillai wrote:
Since I am doing A LOT of loops over the nodes and the number of nodes
is also huge, my concern using sets is that in order to iterate over
the set in each step of my simulation
I am performing simulations on networks (graphs). I have a question on
speed of execution (assuming very ample memory for now). I simplify the
details of my simulation below, as the question I ask applies more
generally than my specific case. I would greatly appreciate general
feedback in
That's a good comparison for the general question I posed. Thanks.
Although I do believe lists are less than ideal here and a different data
structure should be used.
To be more specific to my case:
As mentioned in my original post, I also have the specific condition that
one does not know
On Fri, 25 Jul 2008 16:51:42 +0200, Fredrik Lundh wrote:
Unless I'm missing something, your example keeps going until it's
flagged *all* nodes as on, which, obviously, kills performance for the
first version as the probability goes down. The OP's question was about
a single pass (but he did