Commit 42dccdf8 authored by Kirill Smelkov's avatar Kirill Smelkov

X compilebench: pystone_pyxtest -> pystone_pypyx

In preparation that in addition to pystone.pt there will be also
pystone_pyx.pyx with type annotations.
parent c840774c
...@@ -4,24 +4,24 @@ ...@@ -4,24 +4,24 @@
export LANG=C.UTF-8 # . for floating point in e.g. time output export LANG=C.UTF-8 # . for floating point in e.g. time output
git clean -fdX git clean -fdX
cp pystone.py pystone_pyxtest.py # to be sure that 'import pystone_pyxtest' does not pick up py code cp pystone.py pystone_pypyx.py # to be sure that 'import pystone_pypyx' does not pick up py code
cython -2 pystone_pyxtest.py # -> pystone_pyxtest.c cython -2 pystone_pypyx.py # -> pystone_pypyx.c
wc -l pystone_pyxtest.{py,c} wc -l pystone_pypyx.{py,c}
rm pystone_pyxtest.py rm pystone_pypyx.py
CFLAGS="-pthread -DNDEBUG -fwrapv -O0 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -fPIC -I/usr/include/python2.7" CFLAGS="-pthread -DNDEBUG -fwrapv -O0 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -fPIC -I/usr/include/python2.7"
compileit() { compileit() {
$CC $CFLAGS "$@" -c pystone_pyxtest.c -o pystone_pyxtest.o $CC $CFLAGS "$@" -c pystone_pypyx.c -o pystone_pypyx.o
} }
linkit() { linkit() {
$CC $CFLAGS "$@" -shared pystone_pyxtest.o -o pystone_pyxtest.so $CC $CFLAGS "$@" -shared pystone_pypyx.o -o pystone_pypyx.so
} }
compileandlink() { compileandlink() {
$CC $CFLAGS "$@" -shared pystone_pyxtest.c -o pystone_pyxtest.so $CC $CFLAGS "$@" -shared pystone_pypyx.c -o pystone_pypyx.so
} }
# pystone2bench <subj> converst pystone output into go benchmark format # pystone2bench <subj> converst pystone output into go benchmark format
...@@ -40,7 +40,7 @@ done ...@@ -40,7 +40,7 @@ done
#for CC in gcc clang tcc; do # clang is close to gcc - don't spend time on it #for CC in gcc clang tcc; do # clang is close to gcc - don't spend time on it
for CC in gcc tcc; do for CC in gcc tcc; do
echo "CC=$CC" echo "CC=$CC"
rm -f pystone_pyxtest.{o,so} rm -f pystone_pypyx.{o,so}
for i in `seq $N`; do for i in `seq $N`; do
export TIMEFORMAT="Benchmark${CC}compile 1 %R op/s" export TIMEFORMAT="Benchmark${CC}compile 1 %R op/s"
...@@ -58,7 +58,7 @@ for CC in gcc tcc; do ...@@ -58,7 +58,7 @@ for CC in gcc tcc; do
done done
for i in `seq $N`; do for i in `seq $N`; do
python -c 'import pystone_pyxtest as _; _.main()' |pystone2bench $CC python -c 'import pystone_pypyx as _; _.main()' |pystone2bench $CC
done done
# tcc -O2 does not add anything (tcc accepts -Ox only for compatibility) # tcc -O2 does not add anything (tcc accepts -Ox only for compatibility)
...@@ -72,7 +72,7 @@ for CC in gcc tcc; do ...@@ -72,7 +72,7 @@ for CC in gcc tcc; do
done done
for i in `seq $N`; do for i in `seq $N`; do
python -c 'import pystone_pyxtest as _; _.main()' |pystone2bench ${CC}O2 python -c 'import pystone_pypyx as _; _.main()' |pystone2bench ${CC}O2
done done
done done
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment