[Ecls-list] Slow prettyprinting

Waldek Hebisch hebisch at math.uni.wroc.pl
Sat Jan 5 16:10:03 UTC 2008

I am trying to find out while FriCAS build on top of ECL is
very slow.  The first problem is ECL prettyprinter.  Namely 
FriCAS build generates more than 100 Mb of files which consist
of prettyprinted S-expressions.  My experiments suggest that
ECL need hours to print them -- so prettyprining take a nontrivial
part of 18 hours long build.

Some more data: early in the build process several source files
(written in whitspace-sensitive infix notation) are converted
to Lisp and compiled.  Conversion of one selected file without
prettyprinting (more precisely, with printing using *print-pretty
set to nil) takes 0.221s and conses 14715352 bytes, with prettyprintig
conversion takes 10.372s and conses 618534296 bytes.  Lisp compilation
of resulting file take 4.110s.  So at this stage of build
prettyprintig is the bottleneck.

For comparison, using sbcl and prettyprinting conversion takes
0.278s and conses 19922400 bytes -- profiling indicates that
using sbcl prettyprinting takes about 70% of conversion time.

BTW: is there a way to profile ECL compiled programs?  I found the
problem thanks to the information gathered using sbcl, but
this is unlikely to work for other bottlenecks.

                              Waldek Hebisch
hebisch at math.uni.wroc.pl 

More information about the ecl-devel mailing list