Be interesting for others to try the below script! I will be looking at "flx" to see if I can swap the compiler, i.e. an option like
flx --cxx=g++ flx --cxx=clang++ so I can compile Felix generates C++ with different compilers. Just so you know: MacBook Pro, OSX Snow Leopard. ~/felix>gcc --version i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) ~/felix>clang --version clang version 3.3 (trunk 168409) Target: x86_64-apple-darwin10.8.0 Thread model: posix ~/felix>ocamlopt -version 3.11.1 Bash Script, run from repository: echo "C-clang" clang -O1 -m64 speed/ack/c/ack.c -o clang-ack && ./clang-ack echo "C-gcc" gcc -O2 -m64 speed/ack/c/ack.c -o gcc-ack && ./gcc-ack echo "Felix: clang" flx -O1 -c --static -o flx-ack speed/ack/felix/test.flx && ./flx-ack echo "Ocaml" ocamlopt.opt -o ocaml-ack unix.cmxa speed/ack/ocaml/test.ml && ./ocaml-ack Results: ~/felix>sh perf.sh C-clang Ack(3,13): 65533 7.585431 C-gcc Ack(3,13): 65533 8.391670 Felix: clang Ack(3,13): 65533 7.71534 Ocaml Ack(3,13): 65533 6.965121 Ocaml wins, Felix is second (beating both gcc and clang). And look at this: C: gcc 4.2.1 -O1 Ack(3,13): 65533 25.048595 disgusting. Results vary a bit between runs: ~/felix>sh perf.sh C: clang 3.3 -O1 Ack(3,13): 65533 7.430569 C: clang 3.3 -O2 Ack(3,13): 65533 8.148011 C: gcc 4.2.1 -O1 Ack(3,13): 65533 27.203562 C: gcc 4.2.1 -O2 Ack(3,13): 65533 11.149214 Felix: clang -O1 Ack(3,13): 65533 7.94626 Ocaml 3.11.1 Ack(3,13): 65533 7.956184 I'm working on web pages to display results. -- john skaller skal...@users.sourceforge.net http://felix-lang.org ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language