> -----Mensaje original----- > De: Ron Johnson [mailto:ron.l.john...@cox.net] > Enviado el: jueves, 05 de febrero de 2009 3:30 > Para: debian-user@lists.debian.org > Asunto: Re: Slow Script > > On 02/04/2009 08:04 PM, Alex Samad wrote: > > On Wed, Feb 04, 2009 at 08:45:35PM -0500, Chris Jones wrote: > >> On Wed, Feb 04, 2009 at 01:57:04AM EST, Alex Samad wrote: > >> > >>> [silly time] > >>> 32 * 4 = 128 > >>> > >>> so with 128M of memory he could hold 32 Million long int - I > realise the > >>> record is probably got more than int's so with 1G of spare ram he > could > >>> have 32 bytes per record. > >> Hmm.. 32 bytes records.. maybe a bare-bones ldap directory? > > > > well he is only comparing int by the looks of (we are just guessing > > until we get more info) so 4 long int records ... > > Record overhead? (Python has it. Don't know about Perl.) > > Anyway, the solution is to find a better algorithm, not to optimize > this one. >
That was exactly the point! Thank you everybody. I implemented a Binary Search Algorithm, as someone suggested, and now I get the results in about 5 hours. From years to hours, a good change, isn't it? I think I can even make my script faster working with the PBS of my cluster, but I don't understand it at all yet. This will be my next challenge. A lot of thanks. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org