Hi!
----
Below is a reduced testcase I used to measure the startup time
differences between libc/stdio vs. libast/stdio-based applications:
-- snip --
#include <stdlib.h>
#include <stdio.h>
#include <locale.h>
int main(int ac, char *av[])
{
setlocale(LC_ALL, "");
fputc('@', stdout);
return EXIT_SUCCESS;
}
-- snip --
I've compiled this application like this on Solaris 11/SPARC (using
ast-open.2009-09-08's libast):
-- snip --
$ cc -xc99=%all -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1 -m64 -dalign
-xstrconst -g -xs aststartperf1.c -o a.out_libc
$ cc -xc99=%all -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1 -m64 -dalign
-xstrconst -g -xs -I/usr/include/ast -last aststartperf1.c -o a.out_ast
-- snip --
Running these two binaries in a loop to measure the startup time shows
the following results:
1. For plain Solaris libc/stdio I get the following result:
-- snip --
$ timex bash -c 'export LC_ALL=C ; for ((i=0 ; i < 1000 ; i++ )) ; do
./a.out_libc ; done >/dev/null'
real 18.93
user 0.66
sys 2.90
-- snip --
2. For libast/stdio I get the following result:
-- snip --
$ timex bash -c 'export LC_ALL=C ; for ((i=0 ; i < 1000 ; i++ )) ; do
./a.out_ast ; done >/dev/null'
real 35.77
user 0.67
sys 2.93
-- snip --
The part where I am now scratching my head is what causes the
libast-based application need ~~17 seconds (e.g. nearly twice as much as
the libc one) more time - does anyone have a good idea where this time
may be spend ?
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) [email protected]
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers