[armedbear-devel] patch: do not call compile for every call of eql-specialized generic functions

Anton Vodonosov avodonosov at gmail.com
Mon Jul 13 08:11:41 UTC 2009


Hello.

The attached is a patch to improve performance of eql-specialized
generic functions.

I started to investigate this problem because slime fuzzy completion
works very slow with ABCL.
For example

   (time (swank::fuzzy-completions "de" 'cl-user))

takes 1.5 - 2 seconds. That long time is not pleasant for user interface.

Turned out that most of the time is spent in COMPILE.

During SWANK::FUZZY-COMPLETIONS every symbol is processed by
SWANK-CLASSIFY-SYMBOL, which uses (DOCUMENTATION s 'TYPE),
and every invocation  (DOCUMENTATION s 'TYPE) being eql-specialized
function leads to COMPILE.

With my patch (time (swank::fuzzy-completions "de" 'cl-user))
takes 0.25 - 0.5 seconds. Not too fast, in CLISP the same takes 0.07 sec,
in CCL 0.03 sec. But significantly better than it was.

In the patch method getArgSpecialization could probably be named better.
Also I am not sure if you want to keep the wordy javadoc comment; i just
decided to put the patch explanation to the sources instead of this email.

Best regards,
- Anton
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eql-spec.diff
Type: application/octet-stream
Size: 19311 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/armedbear-devel/attachments/20090713/5ad8e96e/attachment.obj>


More information about the armedbear-devel mailing list