[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CLX Speed: Pretty poor
By default, CLX checks almost all function argument types. You can turn thi
feature off and get significant code shrinkage and speedups. Change
(defconstant *type-check?* t)
in the dependent.l file to
(defconstant *type-check?* nil)
By the way, the comments say you can set *type-check?* to :minimal, but it
lies. Most of the code checks for *type-check?* being null.
Another thing that can slow you down is if you're using the default
xlib::buffer-write-default function provided by CLX in the dependent.l file
This function writes data to the server one byte at a time. Release 3 CLX
code for lisp machines and Lucid to write blocks of words. Release 4 CLX w
have similar code for Franz. I encourage you to write similar code for CMU
CommonLisp, and also to replace the default xlib::buffer-read-default.
Small correction here. Since X11 Release 2, a year and a half ago, CLX has
had code to allow Franz CL to read and write whole blocks at a time.
Since Release 3 there have been some additional improvements -- these are
in May Day CLX, available via public ftp from ucbarpa.berkeley.edu.
Also in May Day CLX is code to make Franz CL type checking fast enough so that
you don't have to bother turning it off. If you turn it off and send a bad
value to the server you get a server error back, which is a lot less friendly
than getting an error before you send the request.
-- John Irwin, email@example.com