Version française
Home     About     Download     Resources     Contact us    
Browse thread
OCaml troll on Slashdot
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Yoann Padioleau <padiolea@i...>
Subject: Re: [Caml-list] OCaml troll on Slashdot
YANG Shouxun <yang.shx@fltrp.com> writes:

> No. My experiments show that the OCaml implementation performs far better than 
> the C++ implementation when the column and row get larger:

Perhaps because you are a liar.

> 
> C++ is compiled with -O3, not sure what is the better optimization level, 
> while OCaml version (actually I used Sys.argv and references to the two 
> parameters) is compiled with ocamlopt
> 
> 4x4 c++
> real    0m0.003s
> user    0m0.002s
> sys     0m0.002s
> 
> 4x4 ocaml
> real    0m0.177s
> user    0m0.137s
> sys     0m0.001s
> 
> 8x8 c++
> real    0m8.703s
> user    0m7.000s
> sys     0m0.018s
> 
> 8x8 ocaml
> real    0m0.747s
> user    0m0.485s
> sys     0m0.002s

I dont know where you get those numbers ? 
I tried the code of the "troll" and the ocaml version performs far _worse_ than
the c++ implementation when the column and row get larger.


> 
> 12x12 c++
> the process was killed by the OS
> 
> 12x12 ocaml
> real    0m1.210s
> user    0m0.886s
> sys     0m0.001s
> 
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
> 

-- 
Yoann  Padioleau,  INSA de Rennes, France   www.irisa.fr/prive/padiolea/
Opinions expressed here are only mine. Je n'écris qu'à titre personnel.
**____   Get Free. Be Smart.  Simply use Linux and Free Software.   ____**