From: Tom Sawyer Date: 2002-08-08T07:46:11+09:00 Subject: Re: Coding challenge (on Ruby Garden) [long] On Wed, 2002-08-07 at 16:04, Christoph wrote: > In a variation of an old statistics saying "there are lies, dammed lies and > benchmarks";-). On the other hand these types of benchmarks do have > their place. If you positively have to verify that a given 1000 x 1000 > matrix is in an ``one_in_each'' relation to a 1000 elements item array > or more likely have to actually generate the corresponding bijection > you'll be dammed (i.e. you will never finish in a reasonable amount > of time) if you asymptotically (worst case or not) slower algorithm. speaking of which, turned out there was a bad bug in my script and after fixing it, it was dog slow. of course i took the brute force approach and determined every purmutation and then looked to see if any of them fit the criteria. well, disappointed with that. i tried my hand at a few other methods with the goal of creating a very fast version no matter the "coding cost". but everything i tried turned out slower. at one point i had a thread running for every array to array-of-array node! my machine about keeled over. :-) threads were not helpful at all. so i have been trying some huristics. essentially reducing the problem down, after eliminating a number of unnecessaries. still, its turned out to be quite a task and i haven't finished yet. just FYI. ~transami