Timing compilation

Robert Goldman rpgoldman at sift.info
Wed Dec 5 15:56:23 UTC 2018


On 5 Dec 2018, at 9:46, Didier Verna wrote:

> François-René ÐVB Rideau écrivait:
>
>> Simplest  method:
>> 1- load the dependencies, possibly using (asdf:operate :prepare-op s)
>> 2- (time (asdf:make s))
>
>   Nice, thank you. If I want to time separately the compilation and
>   loading phases of several libraries (which may depend on each other)
>   however, I would need to restart my session every single time. 
> Another
>   way to do this and, say, report the timings to a file?
>
> -- 
> Resistance is futile. You will be jazzimilated.
>
> Lisp, Jazz, Aïkido: http://www.didierverna.info

Depending on the host lisp you are using, couldn't you wrap the calls to 
`COMPILE-FILE` and `LOAD` in code that times those operation?

You could use dynamic variables bound inside the calls to `PERFORM	` to 
ensure you collect only the information you need, and not other calls to 
those functions that happen to occur.

In ACL you could use function wrappers (`fwrap`) and SBCL has a similar 
feature whose name I can't recall at the moment.

Best,
R
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/asdf-devel/attachments/20181205/5cde7e6c/attachment.html>


More information about the asdf-devel mailing list