James Carroll wrote:
> It looks like your algorithm really does iterate over all values for
> six variables and do lots of math.. then you can't do any better than
> implementing the inner loop in C.
Or Pyrex ...
http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/
For this type of situation, Py
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I appreciate everyone's help!
I got some ideas that I'll try to put into practice.
Regards,
Luis
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCi7QQHn4UHCY8
It looks like your algorithm really does iterate over all values for
six variables and do lots of math.. then you can't do any better than
implementing the inner loop in C. It does look like you have some
functions that are being called that are also in python, and it would
be interesting to see i
On 2005-05-18, Luis P. Mendes <[EMAIL PROTECTED]> wrote:
> I have a 1000 line python script that takes many hours to
> finish. It is running with six inside 'for' loops.
[...]
> How can I dramatically improve speed?
In probably order of efficacy:
1) Use a better algorithm
2) Replace 'for'
Quick tip-
Try xrange instead of range. This will use dramatically less memory
if your search space is large, which will speed things up /if/ your
machine is being forced to swap.
Besides that, without seeing the code for your functions, it's hard to
offer more advice. Your algorithm is necess
On Wed, 18 May 2005 12:56:50 +0100,
"Luis P. Mendes" <[EMAIL PROTECTED]> wrote:
> The reason why I'm using six nested for loops is because I need to find
> the best output using those six variables as input.
> Here's the simplified code:
> for per in range():
> ~for s in range():
> ~
Luis P. Mendes wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> The reason why I'm using six nested for loops is because I need to find
> the best output using those six variables as input.
>
> Here's the simplified code:
>
> for per in range():
> ~for s in range():
> ~fo
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
The reason why I'm using six nested for loops is because I need to find
the best output using those six variables as input.
Here's the simplified code:
for per in range():
~for s in range():
~for t in range():
for v in range()
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Wed, 18 May 2005, Luis P. Mendes wrote:
> Hi,
>
> I have a 1000 line python script that takes many hours to finish. It is
> running with six inside 'for' loops.
>
> I've searched the net for ways to speed up the proccess.
>
> Psyco improves per
"Luis P. Mendes" <[EMAIL PROTECTED]> writes:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi,
>
> I have a 1000 line python script that takes many hours to finish.
> It is running with six inside 'for' loops.
>
> I've searched the net for ways to speed up the proccess.
>
> Psyco improves
You may want to read through this case study by the BDFL.
http://www.python.org/doc/essays/list2str.html
On Tuesday 17 May 2005 05:32 pm, Luis P. Mendes wrote:
> Hi,
>
> I have a 1000 line python script that takes many hours to finish. It is
> running with six inside 'for' loops.
>
> I've search
Without seeing any code, it's hard to tell, but it's not a wild guess
that 'six inside for loops' may be replaced by more efficient ways ;-)
--
http://mail.python.org/mailman/listinfo/python-list
12 matches
Mail list logo