[Shootout-list] Directions of various benchmarks
John Skaller
skaller@users.sourceforge.net
Sat, 21 May 2005 15:14:26 +1000
On Fri, 2005-05-20 at 07:58 -0400, Robert Seeger wrote:
> I disagree with this approach. Personally, I think benchmarks should
> be specified in algorithms stating what needs to be done, rather than
> the steps to do it. Every generally useful language (that I have seen)
> can have a program written for it from a "what needs to be done"
> description.
You aren't being entirely clear: is it is OK to have a specification
that says 'what needs to be done' but still do it a different way?
[If so I have no problem with it: 'calculate the same result
as this algorithm would' is fine by me]
If not:
In Ocaml you tell me to make an array and 'do
so an so' to the array .. but I use a list instead.
Is that OK?
What do you do in Lua, which doesn't HAVE any arrays?
If the spec says a list .. what do you do in Python,
which doesn't HAVE any lists?? [Python 'list' construct
is not a list, its an array]
Sure, I can write a Lua program that 'looks' like it
is using an array, and a Python program 'looks' like
it is using a list .. but they aren't *actually* doing
so .. whatever that means ..
We can argue forever about whether 'looking like an array'
is enough to meet the specification, or whether it
really has to be implemented as contiguous storage with
O(1) access times, and a list has to have separate nodes
with O(n) access times .. I just don't want to have
these arguments.
--
John Skaller, skaller at users.sf.net
PO Box 401 Glebe, NSW 2037, Australia Ph:61-2-96600850
Download Felix here: http://felix.sf.net