Whoops, intended this for the list and sent it to Matthew instead. -------- Original Message --------
Matthew Sherborne wrote: > It must be to do with memory allocation. Any other ideas? > Well, let's see -- we're trying to allocate over 8 million lists of six integers. Even if each of those lists holds only pointers, and ignoring the list overhead itself, that's 24 bytes per list (6 32-bit pointers). Thus, the 8.14 million combinations requires 195,481,440 bytes' worth of pointers alone -- that's over 180MB, and we haven't even considered the list overhead yet. It seems obvious that a brute-force algorithm to calculate this is going to be bound by memory allocation, and if you're running this on machine with 256MB or less of RAM, the performance of the system's virtual memory. Comparing the performance of different languages on this "problem" is really only comparing their memory allocation routines and their ability to optimize away "unused" variables. Jeff Shannon Technician/Programmer Credit International _______________________________________________ ActivePython mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs Other options: http://listserv.ActiveState.com/mailman/listinfo/ActivePython