[Shootout-list] Re: Optimizing for speed vs. beauty

Brandon J. Van Every vanevery@indiegamedesign.com
Wed, 29 Sep 2004 20:59:53 -0700


John Goerzen wrote:
> Brandon J. Van Every wrote:
>
> > You can't put a number on
> > beauty, unless you're into gratuitous lying.  Aside from
> > beauty being in
>
> The lines of code is a number that's there and close.

Well, I'm of the camp that LOC is a big, ancient lie.  For instance, all
of the ASM code I've ever written professionally has had lotsa extra
LOCs just to keep things clear.  And so did the C code which preceeded
it, so that the compiler generated ASM code would stand a chance of
being what I wanted, without having to do it all by hand.  Extra LOC was
clearly the most 'beautiful' way to handle my class of low-level
problems.  Yet I imagine some HLL guy would just make vampire cross
fingers at everything I was doing in the first place.  Drivers??  How
dare you write drivers....

> > What the Shootout actually does do, is make it easy to see
> > comparable
> > code snippets.  Any given language pundit could submit a 'more
>
> I don't think so.  So much effort is spent on optimization that the
> resulting code is such that it would rarely be used in actual practice
> in many cases,

Whose actual practice?  I can assure you that for people who need to
implement performance loops for their apps, the faster snippets are
valid!

> and in many others is so obfuscated as to make it
> virtually useless for learning about the language.

Well PLEAC is definitely the place for learning many languages.  I think
the Shootout has always been mainly about what's fast.  Otherwise why
are we benchmarking stuff?

If there's a specific language you want people to learn, a website
dedicated to that language is adviseable.  Why learn all of 'em?  I'm
all for marketing / advocating specific languages, but if you've
followed ocaml-biz at all lately, you'll realize I think there are
better tactics for evangelizing any one specific language.  Like,
devising a benchmark that favors your language, pitting your strengths
against your main competitor's weaknesses.

I stick around the Shootout because I'm interested in questions of
Performance generally, not any one language per se.  I've always been a
Performance guy.  In fact, the orginal Shootout is what led me to OCaml
in the first place.  Revived, it could lead me somewhere else.

> > So, I think the Shootout can promote greater beauty in the test
> > snippets, but only by getting more language communities 'on
> > the ball'
> > with supporting their favorite language.  I see that as the
> > responsibility of the language communities, mostly.
>
> I'm here.  I know Python and OCaml and am learning Haskell.
> But what is
> the point with providing a beautiful example if most people
> look at the performance numbers?

There isn't one.  Much as I don't belong on caml-list because I'm not a
UNIX techie PhD language wonk, you're barking up the wrong tree wanting
to promote beauty with the Shootout.  IMHO.

How do you 'shoot out' beauty anyways?  Endless debates of my idiom is
better than your idiom?  Recursive algorithms considered cute and all of
that?  I've done and seen plenty of that on caml-list.  Sometimes it's
interesting, often it's boring, and frequently it pisses people off.

What are you going to do when the first Perl programmer shows up and
says you're full of s**t?  Try to get the Python guy to fight it out
with him, so someone else can do the dirty work in the ensuing 'beauty'
flamewar?  Deploy C++ programmers for shits and giggles about garbage
collection not being all that necessary?

> That's why I think the system should support two
> classes of examples.
>
> Besides, it can just be forked from the present form.

Yes, just as I could run off and do my own 'standardized' marketspeak
benchmark website, if I don't find this community's orientation adequate
to my purposes.  The code is free, nothing's stopping either of us.  But
I think we have to consider what a community actually wants to do, what
it actually revolves around.  I try to leverage other people's labor
according to what they actually want to do, and what they are actually
*going* to do.

Is the Shootout actually going to promote 'beauty' as you see it?  Ask
yourself that.  Honestly.


Cheers,                     www.indiegamedesign.com
Brandon Van Every           Seattle, WA

"The pioneer is the one with the arrows in his back."
                          - anonymous entrepreneur