7
\$\begingroup\$

I have a preconception that golfing languages are not fast running. I have no idea if this is correct for some/all golfing languages.

The reason I wonder is that if they are slower than other languages, then setting a time limit for a specific problem size on a question will mean golfing languages need to put more code into optimising for speed, and so only faster languages would be able to use a brute force approach.

Is this an interesting way of promoting competition between different languages with different strengths? Or is it better to keep challenges about one thing or the other (speed or length)?

\$\endgroup\$
  • 9
    \$\begingroup\$ There is a limited extent to whether you can call a language fast or slow. What really matters is whether implementations are fast or slow. E.g. when working on mini Rondo I submitted a patch to the official interpreter which made a massive difference to the speed of array-string concatenation without changing the language at all. \$\endgroup\$ – Peter Taylor Jun 6 '15 at 8:22
  • 4
    \$\begingroup\$ IMO if these restrictions become common, there will be soon people writing fast golfing language interpreters. \$\endgroup\$ – jimmy23013 Jun 7 '15 at 1:30
5
\$\begingroup\$

Pyth is essentially exactly as fast as Python for most purposes, because it compiles into Python. I'm not sure about the speeds of other golfing languages, but I doubt it's a large enough difference to be relevant to whether the code finishes under a time limit in most cases.

I think it's important to distinguish between two cases: Do you want to favor traditional (non-golfing) languages, or fast programs?

If you want to favor fast programs, then a code challenge approach whose scoring system incorporates speed and length is best.

If you want to favor non-golfing languages, giving a bonus based on the TIOBE Index ranking might be a good solution. For instance, "Subtract 1 byte for every position above 50th your language is in the rankings" or something.

If you want to favor non-golfing languages, do so directly, not via a proxy like runtime.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .