in reply to Re: Filling buckets
in thread Filling buckets

Good data, Fastolfe! It's fun to look back at the fragments and guess how well they compare against one another, and then have hard data to check your guesses against.

In this particular case, though, I'll bet a round of virtual drinks that performance isn't an issue, and that the split-into-three-lists routine gets called no more than a handful of times per CGI invocation.

Replies are listed 'Best First'.
Re: Re: Re: Filling buckets
by repson (Chaplain) on Jan 03, 2001 at 13:27 UTC
    Yeah I'd say performance probably doesn't really matter.

    If it really isn't an issue then it would be better to rate the solutions on efficiency, maintainability, flexibility and coolness.

    eg's solution may be the fastest in this set of benchmarks, but it doesn't include a variable number of buckets (which may be useful later in a project) and it isn't one the one that I personally (not begin a perl god) can understand and alter the fastest.

    Maybe someone else can come up with a better, and overall rating....

      I wasn't trying to say one person's code sucked over another's. I was just giving benchmark information. When we have a lot of code offered like that I like to see statistics like that sometimes. A good benchmark usually means the coder has a good understanding of what operations in Perl are more efficient, and took that into account when offering his solution. In my eyes that's the sign of a very good Perl coder!

      Any arbitrary "rating" taking other aspects of their code into account would be incredibly subjective and not very useful. Readability is in the eye of the beholder, so to speak, so take a look at each of them and decide for yourself which one is the most elegant in your eyes for the efficiency it gets.