Script that times 100 compilations of a hello world C program. Under
Haiku it is rather slow (on my machine about 80% slower than on Zeta) and sometimes a compilation even fails, due to what looks to me like a problem with gcc's subprocess synchronization (our wait()/waitpid() or friends might have some race condition). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23371 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Executable
+34
@@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
|
||||
testDir=/tmp/compile_bench
|
||||
rm -rf $testDir
|
||||
mkdir -p $testDir
|
||||
cd $testDir
|
||||
|
||||
cat << EOF > hello_world.cpp
|
||||
#include <stdio.h>
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
printf("Hello world!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
EOF
|
||||
|
||||
compile_all()
|
||||
{
|
||||
for f in $(seq 100); do
|
||||
echo -n .
|
||||
g++ -o $f ${f}.cpp
|
||||
done
|
||||
}
|
||||
|
||||
for f in $(seq 100); do
|
||||
cp hello_world.cpp ${f}.cpp
|
||||
done
|
||||
|
||||
time compile_all
|
||||
|
||||
rm -rf $testDir
|
||||
Reference in New Issue
Block a user