[Shootout-list] Directions of various benchmarks

Isaac Gouy igouy2@yahoo.com
Fri, 20 May 2005 23:37:48 -0700 (PDT)


--- John Skaller <skaller@users.sourceforge.net> wrote:
> 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 ..

It seems your information is out-of-date: 

"Unlike other scripting languages, Lua does not offer an array type.
Instead, Lua programmers use regular tables with integer indices to
implement arrays. Lua 5.0 uses a new algorithm that detects whether
tables are being used as arrays and automatically stores the table as
an actual array, instead of as a hash table."

The Implementation of Lua 5.0
http://www.tecgraf.puc-rio.br/~lhf/ftp/doc/sblp2005.pdf




		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search. 
http://info.mail.yahoo.com/mail_250