[Shootout-list] Windows
Aldo Calpini
dada@perl.it
Mon, 04 Oct 2004 18:37:03 +0200
Brent Fulgham wrote:
> Nothing prevents the code from working across platforms. I approached
> the win32 maintainer
> about unifying the source code, and we both agreed this would be a good
> thing. However, I
> think he is busy with other things and hasn't been able to do much. He
> already has Alioth CVS access.
but I forgot to subscribe the mailing list :-)
now that I'm here (trying to catch up with what's in the archive), yes,
I'm really busy with other things.
regarding the issue with cross-platform development, there are 2 points
to note:
1) the benchmarking code needs to be platform-specific. I don't know if
Brent changed the code Doug Bagley wrote, but on Linux it relies on
GTop, which is not available on Win32. on Win32, I wrote a little script
which uses Win32::Process + Win32::API to do the job (which seems to be
more accurate, but not portable alas).
2) the benchmark themselves are mostly cross-platform: some languages
could be excluded from some platform, but if a benchmark is supposed to
run on different platform, the code itself should not change (we could
do that with #ifdef .. #endif in C and/or similar features in other
languages).
> I think there is a separate
> win32 Perl script to run the tests, but I don't have a copy.
to get a copy:
cvs -d:pserver:anoncvs@dada.perl.it:/CVS login
CVS Password: anoncvs
cvs -d:pserver:anoncvs@dada.perl.it:/CVS -z3 co shoot
the relevant files are:
lib/Shootout.pm
this is the "library" code, which contains the benchmark definitions
and some utility functions
bin/bencho.pl
this is the "frontend" script. it can run a single benchmark, or the
full suite
bin/brun.pl
this is the (platform-specific) benchmarking code. it is called by
bencho.pl, and by itself does know nothing about the Shootout. it
just gets a command line and reports on CPU and memory usage
bin/htmlize.pl
this is the script which gathers data and build all the HTML for
the site
config.sample
this contains the definition (path, executable names, etc.) for all
the languages. should be renamed to "config" before running the
shootout. this is, obviously, platform- and site-specific
hope this helps :-)
cheers,
Aldo