From: Chad Perrin Date: 2010-11-12T11:42:07+09:00 Subject: Re: Ruby Perofrmance --2fHTh5uZTiUOsy+g Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 09, 2010 at 11:26:18PM +0900, Peter Hickman wrote: > Many moons ago I started a thread that advocated writing it in C if > you wanted performance. There were several discenting opinions and I > set up a little trial to generate all possible latin squares, > http://en.wikipedia.org/wiki/Latin_square. People then submitted > implementations in languages of their choice and I ran and timed them > on the hardware I had. The result was that ocaml beat out the field > including hand written C++ and Java, if I recall correctly erlang came > a close second followed by java. C and C++ are not the same language, and there is typically a notable difference in performance between code written in one and code written in the other, even when they do roughly the same thing. I'm sure C would, at least in most cases, do at least as well as OCaml -- even if C++ typically lands somewhere behind imperative OCaml code. I'm not saying that you're wrong about OCaml being a good choice for speed. It usefully combines great performance with a good, friendly syntax and powerful semantic model. I just don't think it's useful to say OCaml comes in first while you mention C just because OCaml did better than C++, which does *not* have the same performance characteristics as C, in the general case. Note that I'm referring to language names, but my observations tend to hold true across major implementations of those languages, from what I have seen. --=20 Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] --2fHTh5uZTiUOsy+g Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkzcqAoACgkQ9mn/Pj01uKUsrwCfZIWUnrMBld8i6HNoH6j6yePu NBIAoNNxIgsBZhmMy1L++Ok6NuPve2SY =2z7D -----END PGP SIGNATURE----- --2fHTh5uZTiUOsy+g--