From: "Eric I." Date: 2007-11-19T15:15:03+09:00 Subject: Re: Goedel (#147) On Nov 18, 10:26 pm, James Edward Gray II wrote: > On Nov 18, 2007, at 7:40 PM, Eric I. wrote: > > > I wanted to make an effort at runtime efficiency. > > Clever stuff. Did you benchmark this against any other approaches? > I would love to know what kind of an improvement you achieved. I was curious about this too. So I ran the five solutions submitted so far back to back on decoding (not encoding). The plain text is the following quote from Einstein consisting of 329 characters. I wanted it to be somewhat long to highlight speed differences, and 329 characters is really not all that big. And Einstein and Goedel were good friends when they both worked at Princeton. Here's the quote; note the embedded newlines: The important thing is not to stop questioning. Curiosity has its own\nreason for existing. One cannot help but be in awe when he\ncontemplates the mysteries of eternity, of life, of the marvelous\nstructure of reality. It is enough if one tries merely to comprehend a\nlittle of this mystery every day. Never lose a holy curiosity.\n Encoded, it's an 87,418 digit base 10 number. I had to adjust some others' solutions minimally. For example, I had to expand the list of primes that Justin Ethier's solution used, and I had to put the encoded message in one of his blocks before submitting it to his decode routine. Here are the times I got in seconds: Eric I: . 3.485 James Koppel: 11.779 Justin Either: 11.868 Eric Lavigne: 19.390 steve: 20.982 So it would appear that the complexity of my process pays off in time. Of course, everything is a tradeoff. I went for speed. Others aimed for alternate worthwhile goals, such as easy to understand code, succinct code, and/or highly Rubyesque code. Eric