Ok, so here's the go. I am using "make speed".
This says:
speed:
-rm -rf result.tmp
sh speed/perf.sh 2>>result.tmp
build/release/bin/flx_gengraph
The speed/perf.sh script says:
mkdir -p sandbox
echo "PROG: ack" >&2
echo "Felix: clang -O1" >&2
flx -O1 -c --static -o sandbox/flx-ack speed/ack/felix/test.flx && time
sandbox/flx-ack
echo "C: clang 3.3 -O1" >&2
clang -O1 -m64 speed/ack/c/ack.c -o sandbox/clang-O1-ack && time
sandbox/clang-O1-ack
echo "C: clang 3.3 -O2" >&2
clang -O2 -m64 speed/ack/c/ack.c -o sandbox/clang-O2-ack && time
sandbox/clang-O2-ack
echo "C: gcc 4.2.1 -O1" >&2
gcc -O1 -m64 speed/ack/c/ack.c -o sandbox/gcc-O1-ack && time sandbox/gcc-O1-ack
echo "C: gcc 4.2.1 -O2" >&2
gcc -O2 -m64 speed/ack/c/ack.c -o sandbox/gcc-O2-ack && time sandbox/gcc-O2-ack
echo "Ocaml 3.11.1" >&2
ocamlopt.opt -o sandbox/ocaml-ack unix.cmxa speed/ack/ocaml/test.ml && time
sandbox/ocaml-ack
echo "PROG: nbody" >&2
echo "Felix: clang -O1" >&2
flx -O1 -c --static -o sandbox/flx-nbody speed/nbody/felix/test.flx && time
sandbox/flx-nbody
echo "C: clang 3.3 -O1" >&2
clang -O1 -m64 speed/nbody/c/nbody.c -o sandbox/clang-O1-nbody && time
sandbox/clang-O1-nbody
echo "C: clang 3.3 -O2" >&2
clang -O2 -m64 speed/nbody/c/nbody.c -o sandbox/clang-O2-nbody && time
sandbox/clang-O2-nbody
echo "C: gcc 4.2.1 -O1" >&2
gcc -O1 -m64 speed/nbody/c/nbody.c -o sandbox/gcc-O1-nbody && time
sandbox/gcc-O1-nbody
echo "C: gcc 4.2.1 -O2" >&2
gcc -O2 -m64 speed/nbody/c/nbody.c -o sandbox/gcc-O2-nbody && time
sandbox/gcc-O2-nbody
echo "Ocaml 3.11.1" >&2
ocamlopt.opt -o sandbox/ocaml-nbody unix.cmxa speed/nbody/ocaml/nbody.ml &&
time sandbox/ocaml-nbody
echo "PROG: mandelbrot" >&2
echo "Felix: clang -O1" >&2
flx -O1 -c --static -o sandbox/flx-mandelbrot speed/mandelbrot/felix/test.flx
&& time sandbox/flx-mandelbrot
echo "C++: clang 3.3 -O1" >&2
clang++ -O1 -m64 speed/mandelbrot/c++/test.cc -o sandbox/clang-O1-mandelbrot &&
time sandbox/clang-O1-mandelbrot
echo "C++: clang 3.3 -O2" >&2
clang++ -O2 -m64 speed/mandelbrot/c++/test.cc -o sandbox/clang-O2-mandelbrot &&
time sandbox/clang-O2-mandelbrot
echo "C++: gcc 4.2.1 -O1" >&2
g++ -O1 -m64 speed/mandelbrot/c++/test.cc -o sandbox/gcc-O1-mandelbrot && time
sandbox/gcc-O1-mandelbrot
echo "C++: gcc 4.2.1 -O2" >&2
g++ -O2 -m64 speed/mandelbrot/c++/test.cc -o sandbox/gcc-O2-mandelbrot && time
sandbox/gcc-O2-mandelbrot
echo "Ocaml 3.11.1" >&2
ocamlopt.opt -o sandbox/ocaml-mandelbrot unix.cmxa
speed/mandelbrot/ocaml/test.ml && time sandbox/ocaml-mandelbrot
rm -rf sandbox
and flx_gengraph reads result.trmp and writes
speed/ack/result.svg
speed/mandelbrot/result.svg
speed/nbody.svg
Viewing
speed/perf.fdoc
with the Felix webserver then shows the program code and nice graphs.
DO NOT DO WHAT I DO.
Because, the *.svg files are committed to the repository so that they
can be copied to the felix-lang.org website.
Until there's a better mechanism:
mkdir $HOME/speedway
cp -r speed $HOME/speedway
cd $HOME/speedway
now you can happily run the speed/perf.sh script like in the Makefile, and run
an installed version of flx_gengraph.
Note: I will probably move speed into src because at the moment the webserver
index.html in the repo has a link that works in the final install,
but doesn't work in the repo image.
--
john skaller
[email protected]
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language