Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
26ad1917
Commit
26ad1917
authored
May 28, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X compilebench: Rewok compile/link/compile+link to not hardcode on what to work
In preparation to add pystone_pyx.pyx
parent
42dccdf8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
t/compilebench/doit.sh
t/compilebench/doit.sh
+15
-9
No files found.
t/compilebench/doit.sh
View file @
26ad1917
...
...
@@ -12,16 +12,22 @@ rm pystone_pypyx.py
CFLAGS
=
"-pthread -DNDEBUG -fwrapv -O0 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -fPIC -I/usr/include/python2.7"
compileit
()
{
$CC
$CFLAGS
"
$@
"
-c
pystone_pypyx.c
-o
pystone_pypyx.o
# compile <name>
compile
()
{
name
=
$1
;
shift
$CC
$CFLAGS
"
$@
"
-c
$name
.c
-o
$name
.o
}
linkit
()
{
$CC
$CFLAGS
"
$@
"
-shared
pystone_pypyx.o
-o
pystone_pypyx.so
# link <name>
link
()
{
name
=
$1
;
shift
$CC
$CFLAGS
"
$@
"
-shared
$name
.o
-o
$name
.so
}
# compileandlink <name>
compileandlink
()
{
$CC
$CFLAGS
"
$@
"
-shared
pystone_pypyx.c
-o
pystone_pypyx.so
name
=
$1
;
shift
$CC
$CFLAGS
"
$@
"
-shared
$name
.c
-o
$name
.so
}
# pystone2bench <subj> converst pystone output into go benchmark format
...
...
@@ -44,17 +50,17 @@ for CC in gcc tcc; do
for
i
in
`
seq
$N
`
;
do
export
TIMEFORMAT
=
"Benchmark
${
CC
}
compile 1 %R op/s"
time
compile
it
time
compile
pystone_pypyx
done
for
i
in
`
seq
$N
`
;
do
export
TIMEFORMAT
=
"Benchmark
${
CC
}
link 1 %R op/s"
time
link
it
time link
pystone_pypyx
done
for
i
in
`
seq
$N
`
;
do
export
TIMEFORMAT
=
"Benchmark
${
CC
}
compile+link 1 %R op/s"
time
compileandlink
time
compileandlink
pystone_pypyx
done
for
i
in
`
seq
$N
`
;
do
...
...
@@ -68,7 +74,7 @@ for CC in gcc tcc; do
for
i
in
`
seq
$N
`
;
do
export
TIMEFORMAT
=
"Benchmark
${
CC
}
compile+linkO2 1 %R op/s"
time
compileandlink
"-O2"
time
compileandlink
pystone_pypyx
"-O2"
done
for
i
in
`
seq
$N
`
;
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment