[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Jul 1 07:50:25 2003 
Subject:New errno handling seems to speed up poplog 
From:Aaron Sloman 
Volume-ID:1030701.03 


I wondered whether the recent changes adding extra indirection through a
C procedure to access errno might slow down poplog.

So I ran a simple benchmark (running prolog to reverse a list many
times, generating a lot of garbage etc.).

I tried this on the newly built system with the changes described in
recent messages. I also took the old system sources and recompiled and
relinked them. So the only differences between the two systems were in
the small number of changed files for handling access to errno
(two pop11 files and 1 C file).

To my surprise the old version consistently took about 11 %
longer -- using the shell 'time' command, and using the real time.
The 'user cpu' time ratio was about the same.

I.e. planting a call to a C program instead of assembling direct access
to a C global variable in the system sources produced a significant
speedup.

I am surprised, but maybe a compiler expert would not be?

It makes me wonder whether other changes would do the same.

These tests were running on a 1ghz AMD athlon using redhat 8.

On a 1.5ghz intel pentium 4 also running redhat 8 in the department of
computer science the speed up was reduced to about 5%. That was on a
machine where all files were accessed via NFS, which may have
slightly reduced the impact of the changes because of extra time
required for accessing remote files.
Also the new system was not recompiled on that machine, but on the
athlon, and then copied over to the pentium 4. I don't know if that
would make a difference: perhaps the C compiler or the linker optimised
for the athlon?

Can anyone explain why invoking Waldek's C procedure should have
been faster?

Aaron
====
Aaron Sloman, ( http://www.cs.bham.ac.uk/~axs/ )
School of Computer Science, The University of Birmingham, B15 2TT, UK
EMAIL A.Sloman AT cs.bham.ac.uk   (ReadATas@please !)
PAPERS: http://www.cs.bham.ac.uk/research/cogaff/ (And free book on Philosophy of AI)
FREE TOOLS: http://www.cs.bham.ac.uk/research/poplog/freepoplog.html