[Ecls-list] Slow prettyprinting (update)

Waldek Hebisch hebisch at math.uni.wroc.pl
Thu Feb 14 14:26:07 UTC 2008


Juan Jose Garcia-Ripoll wrote:
> On Feb 5, 2008 4:53 AM, Waldek Hebisch <hebisch at math.uni.wroc.pl> wrote:
> > Juan Jose Garcia-Ripoll wrote:
> > > On Feb 3, 2008 8:41 PM, Juan Jose Garcia-Ripoll
> > > <jjgarcia at users.sourceforge.net> wrote:
> > > > ; With FORMATTER
> > > > real time : 2.228 secs
> > > > run time  : 2.136 secs
> > > > gc count  : 16 times
> > > > consed    : 35079776 bytes
> > >
> > > Second iteration. Now uses a new optimization in the compiler which
> > > inlines (FUNCALL (FORMATTER ...) ...)
> > >
> > > real time : 1.990 secs
> > > run time  : 1.950 secs
> > > gc count  : 16 times
> > > consed    : 34967912 bytes
> 
> With the new_apply branch, we gain a factor 5 in consing and 5% in speed.
> 
> real time : 1.872 secs
> run time  : 1.831 secs
> gc count  : 4 times
> consed    : 6737952 bytes
> 
> I am not sure how much this improves build times in FriCAS.
> 

ATM I did not check new_apply branch.  Most data I have measures
different improvements, but here is comparison for simplified
build.  Simplified build saves a lot of time consuming using
pregenerated files (this is essentially the time users of
"full" release will see).  Using released ecl-0.9j-p1 real
time on 1.86 GHz Intel Core 2 is 22m59.790.  Using CVS 2008-02-04 23:57
real time is 18m37.244.

Notes: 
- simplified build prints about 9Mb of S-expressions and uses about
  30Mb of pregenerated S-expressions
- simplified build spends more that 8 minutes compiling Lisp files,
  more presisely tere is a build step which only compiles pregenerated
  Lisp files, this step takes 8m 21s using release ecl-0.9j-p1 and
  8m 12s using CVS 2008-02-04 23:57
- currently simplified build compiles about 1200 Lisp files in a single
  image.  Previous FriCAS versions compiled each Lisp file using
  separate image.  Using single image saved about 20 min of build time
  -- each image needed more than 1s to start up.  Note that the image
  used for compilation contains most of core FriCAS -- I can not use
  plain ecl as compilation depends on macros preset in FriCAS.
  I would prefer compiling Lisp files in separate images, because then
  make can paralellize build on multicore machines.  However, currently
  loss due to startup time is bigger than gain from paralell build
  on dual core...
- when building CVS version, most time is spent compiling files written
  using Spad language to Lisp.  Currently the hottest routine in this
  step is 'assoc'.  Namely, Spad to Lisp compiler implements symbol table
  as a list of pairs (symbol, property list) and uses 'assoc' with 'eq'
  test to search for symbols.  It looks that ECL version of 'assoc' is
  slower than 'assoc' in other Lisp implementations (probably 1.5 - 3
  times slower).  I plan to change FriCAS symbol table to avoid
  linear search, so hopefully 'assoc' will became insignificant...
  
So there are 3 bottlenecks that I found:
- prettyprinting
- startup time
- assoc

-- 
                              Waldek Hebisch
hebisch at math.uni.wroc.pl 




More information about the ecl-devel mailing list