* Ton Hospel <[EMAIL PROTECTED]> [2003-08-30 14:39]:
> > Also to be added: an edge testcase with everything at max:
> > full length input string, all 10 transforms full length.
> 
> I guess I was being too subtle with that last sentence.
> Several solution build a repeated s/// string, and then eval that.
> leading to a 127*128*(2*80+5)=26822400 char string.

Just to be clear, what exactly do those numbers represent?

> The rules guarantee you a "a few million" entries in a datastructure,
> and 27 million is a lot more than that. In actuallity evalling such a 
> string uses bout 360M real memory on my perl, again clearly too much.
> 
> So i think a lot of solutions have to be rejected.

Mine was one of the solutions that creates a repeated s/// string and then
evals it.  I didn't realize how slow they were until I started creating some
pathological tests on my own and then discovered version 9 of the test suite
about an hour before the end of the contest. :)  And memory usage never even
crossed my mind.  It may be that these solutions eventually have to be
rejected, but if so, I'd like to talk about why.  I'm a little embarrassed (or
should I be proud?) at having my solution be one of those that prompts a
discussion of the rules, but I suppose it had to be discussed sometime.

I guess it isn't clear to me how to interpret rules 12 and 13 of the generic
rules, and how they should be applied.  I interpreted rule 12 to mean that your
program can use up to 2**32 bytes (about 4GB) of memory - basically, that it
must not require infinite amounts of memory and that 2**32 bytes is an upper
limit.

But rule 13 seems to say using 2GB of memory is too much.  It also says that
you can make data structures of "a few million entries", and that "@a=(1)x1e6"
is okay, but "@a=(1)x1e8" is not.  In this particular contest, the line seems
to be thin.  Creating a data structure of five million entries ("@a=(1)x5e6")
uses 117M on my system.  In contrast, my 49 solution uses 129M of memory to
solve test 24 (the big one) from test suite v9.  Is it too much?  If so, why?
My 47 solution uses 229M.  Is that too much?  We should probably clarify
exactly how much is too much.

Anyway, whatever we decide about rejecting solutions, I had fun on this hole!
It's good to be golfing again.

-- Mike

-- 
Michael W. Thelen
Just don't create a file called -rf. :-)
    --Larry Wall in <[EMAIL PROTECTED]>

Reply via email to