[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Results on Lisp Profilers

A couple of weeks ago, I posted an inquiry to this mailing list about the
existence of profiling tools for Common Lisp.  Here's a summary of my

CMU's Common Lisp has a timing package.  Apparently, it is "public domain, and
public domain, and people can get our library from ISI or some such
organization in California."  It didn't appear very useful for my purposes
because "if functions A and B are profiled, and A calls B, then the accumulated
time for A will include time spent in B."  Since a lot of my code is recursive
(directly and indirectly), this policy would be unusable.

Stuart Shapiro at Buffalo (shapiro@cs.buffalo.edu) sent me his profiler.  In
this tool, "statistics kept are number of times called and amount of run-time
spent in the function (minus time spent in dynamically embedded profiled

Finally, Lois Lew from Lucid (sun-support@lucid.com on ARPA or
...!sun!edsel!sun-support on UUCP) sent me their profiler.  It also accounts
for dynamically embedded profiled functions.  In addition to timing, it also
shows how much heap space was allocated during the function's execution.  This
seems a very useful feature, given the "buy now -- pay later" aspect of most
garbage collectors.  I don't have enough experience with it yet, but so far I
like it.  Here is an example of its output:

    -> (print-all-monitors)
     Monitor information for SIMPL
    Number of calls    : 10
    Time (secs)        : 0.291
    Avg. time / call   : 0.029
    Words of consing   : 2770
    Avg. words / call  : 277.000

     Monitor information for GC
    Number of calls    : 1
    Time (secs)        : 0.116
    Avg. time / call   : 0.116
    Words of consing   : 0
    Avg. words / call  : 0.000

     Monitor information for COPY-LTERM
    Number of calls    : 2
    Time (secs)        : 0.039
    Avg. time / call   : 0.019
    Words of consing   : 32
    Avg. words / call  : 16.000

     Monitor information for SOLVE
    Number of calls    : 2
    Time (secs)        : 0.796
    Avg. time / call   : 0.398
    Words of consing   : 6766
    Avg. words / call  : 3383.000


				- Conal