From: jstern@... (Josh Stern) Date: 2001-01-07T07:40:02+09:00 Subject: [ruby-talk:8768] Re: Interesting Language performance comparisons - Ruby, OCAML etc Charles Hixson wrote: >Phil Tomson wrote: > >> ... >> >> And then there's the Winner (of these tests anyway) Ocaml - I'm not sure >> what that is, but it beat out the next closest one (Java) by 114 points! >> ... >> Seems that Ruby is already doing pretty well in this particular suite of >> tests. And there probably is room for some improvement in some of these >> tests. >> >> Phil > >Well, OCaML is Object CaML where CaML is a relative of ML, and that's >most of what I know. It's one of the functional languages with a >derived type system, and having it come anywhere near the top is quite >impressive. Ocaml is strongly typed, and the creators put a lot of thought and effort into making it compile efficiently. Some of those thoughts can be read in papers on their web page. >Having it at the top is enough to make one wonder if the >examples were choosen specifically to put it in a good light (and is >impressive anyway!). I don't think so, but... >In fact, every language that is faster than C causes me to wonder about >the C code/compiler. Only assembler should be able to be faster than >C. And even that should take a lot of hand optimization. The other languages are not "faster than C". If you look closely at the "shootout" pages, you will see that there are two major variables, unrelated to either the languages or their implementations, that affect the ratings. The first is whether anybody bothered to write sample code for that language for a given test - they are penalized for each test where there is no sample code. The second is that many of the sample codes are not what would be written to optimize speed; they seem to be written to optimize some subjective metric like "presenting characteristic flavor of the language" - e.g. what a typical application programmer might write if they were not worried about speed. >Yes, and I'm also quite surprised at how high on the charts Java is. >This with Java missing out on two of the tests totally. Something >really wierd is going on here. I find these results interesting and >provocative, but so obviously flakey that no reliable conclusion can be >drawn. (Interesting conjectures though.) See above. -= Josh