Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
> On Jan 5, 2008 5:10 PM, Waldek Hebisch <hebisch@...> wrote:
> > 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.
> Understood. Well, the problem is that ECL is using SBCL's code to
> pretty-print. While this code might be optimally compiled in SBCL, I
> am unsure about the quality of the code generated by ECL for this
> particular file. I guess this has a lot to do with the fact that this
> code is based on CLOS and Gray streams and that method calls in ECL
> are not very efficient.
I checked impact of method caching on prettyprinting. On a sample
file I get:
real time : 4.897 secs
run time : 4.890 secs
gc count : 159 times
consed : 301105544 bytes
ecl CVS 2008-01-12 15:13
real time : 4.768 secs
run time : 4.760 secs
gc count : 136 times
consed : 301098120 bytes
So, change to caching has measurable positive effect on prettyprinting.
But the effect is rather small. Given amount of consing I suspect
that the bottlenect is somewhere else. Also, sbcl conses about
100 time less then ecl.
0.076 seconds of real time
0.08 seconds of user run time
0.0 seconds of system run time
0 calls to %EVAL
0 page faults and
3,818,176 bytes consed.
Real time: 0.087328 sec.
Run time: 0.09 sec.
Space: 8538440 Bytes
GC: 9, GC time: 0.05 sec
I used the following program to get times (the file "marko.clisp"
has 110 kb and contains a single S-expression):
(progn (setf form (with-open-file (fil "marko.clisp") (read fil))) nil)
(let ((*print-readably t))
(with-open-file (fil "out" :direction :output
(time (pprint form fil)))