[xcvb-devel] Speed comparisons

Spencer Brody sbrody at itasoftware.com
Tue Jul 29 21:55:48 UTC 2008


Hello,
So we now have a working version of XCVB that allows dependencies on 
compile time side effects.  The only way XCVB can actually compile 
anything is still by generating a makefile and using make to compile it, 
but I thought I'd send out some interesting results of some tests I did 
comparing the compilation times of xcvb in some different cases.

The following tests were conducted on a small (~150 lisp files) system 
(called quux) at ITA software.  They were done using a modified version 
of SBCL 1.0.17.39, in which one of the modifications was to allow the 
compiler to output a cfasl for the compile-time side effects of the file 
(more information about this patch can be found at 
http://common-lisp.net/project/xcvb/docs/xcvb.text, see section 1.3).  I 
have attached the /proc/cpuinfo file to give you an idea of the hardware 
capabilities of the machine that was running these tests.


First, as a benchmark:
   The amount of time to compile quux using ASDF:                     
           32.35s user 1.70s system 99% cpu 34.264 total

We know that XCVB is going to be slower than ASDF, because XCVB has 
separate compilation.

The first way I tried using XCVB was without using any dependencies on 
compile-time side effects.  In the auto-conversion of quux from ASDF to 
XCVB, if file A depended on file B in the asd file, then A was assumed 
to depend on loading B at both compile-time and load-time.  The times 
for that were as follows:
     time make -f Makefile.xcvb 
all                                                              73.02s 
user 6.60s system 99% cpu 1:20.30 total
   time make -j100 -f Makefile.xcvb all                                 
                    78.45s user 7.52s system 183% cpu 46.835 total


Then I tried allowing dependencies on compile-time side effects.  In the 
auto-conversion of quux from ASDF to XCVB, if file A depended on file B 
in the asd file, then A was assumed to depend on the compile-time 
effects of B at compile time, and on the load-time effects of B at 
load-time.  This essentially means that before compiling A.lisp, you 
would load B.cfasl, and before loading A.fasl you would load B.fasl.  
This system worked for almost all of quux, although there were a couple 
of places where I needed to manually change some of the compile-time 
dependencies to be on a fasl instead of on a cfasl.  The introduction of 
cfasls sped things up quite a bit, the times are below:

   time make -f Makefile.xcvb all                                       
                       51.70s user 5.17s system 97% cpu 58.361 total
   time make -j100 -f Makefile.xcvb all                                 
                    55.30s user 5.75s system 179% cpu 34.010 total



So, as you can see, using cfasls sped up compilation so much that along 
with make -j100 (which allowed make to take advantage of the 4 cores on 
my machine) XCVB was just as fast as ASDF.


-Spencer

Spencer Brody
XCVB main developer
Software Intern
ITA Software

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cpuinfo
URL: <https://mailman.common-lisp.net/pipermail/xcvb-devel/attachments/20080729/e2c069dc/attachment.ksh>


More information about the xcvb-devel mailing list