Liam Healy ([info]lhealy) wrote,
@ 2007-11-06 18:54:00
Previous Entry  Add to memories!  Tell a Friend  Next Entry
Entry tags:lisp

Profiling in SLIME
This is about the easiest profiling I've seen in any language. In
fact, I think it's the only time I been able to make significant
improvements based on the report.

M-x slime-toggle-profile-fdefinition
on all the functions you want to
profile,
M-x slime-profile-reset
to clear any existing data, and
M-x slime-profile-report
to see the report after running.
I did it on one of my functions which was taking 700+ seconds to run.
I immediately saw that I was doing an unnecessary computation, which
when removed resulted in a 90 second run. Some more profiling and
other work yielded an end result of 2.5 seconds.



(2 comments) - (Post a new comment)

Easy?
(Anonymous)
2007-11-07 04:47 pm UTC (link)
Having to manually select which functions you want to profile doesn't seem particularily easy. And you only get a text dump of the profile report to the repl buffer. I like to think that the approach that slime-sprof takes (commands to start/stop profiling, and a command to open an interactive elisp interface for browsing the results) is easier.

-- Juho

(Reply to this) (Thread)

Re: Easy?
[info]lhealy
2007-11-08 07:18 pm UTC (link)
Actually, that's an advantage to me. The problem I've had in the past with profilers is that they profile everything. It's hard to pick out what I'm interested from the results. Generally, I can find a handful of functions that will pinpoint the problem pretty quickly. Then when that problem is fixed, I can move on to the next bottleneck which I can find profiling another set of functions. On the other hand, it seems that they have the ability to profile every symbol in a package.

(Reply to this) (Parent)


(2 comments) - (Post a new comment)

Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…