Cyrus Harmon ch-mcclim@bobobeach.com writes:
Ok, here's where I admit to not really knowing how to use a profiler for lisp code :-).
I don't know what facilities OpenMCL provides for profiling. However, other implementations provide multiple methods for finding out where time is spent; even if you're not using those implementations for development, you can use them to get an idea where the bottleneck is.
But, keystroke processing seems like a pretty fundamental part of what an editor needs to do.
Don't judge by what seems to be obvious. Really. You will be wrong.
70 wpm ~= 400 char/min = 6 char/sec. We're looking at ~100 things on the list per char, so we're doing roughly 1000 comparisons per second. Not good.
* (defvar *magic* (cons nil nil)) * (time (let ((x (cons nil nil))) (dotimes (i 1000000) (eql x *magic*))))
Evaluation took: 0.167 seconds of real time 0.166975 seconds of user run time
so 1000 comparisons will take about 0.0002 seconds. That leaves 0.9998 seconds for other processing. I'm pretty sure that 1000 comparisons is truly insignificant, but on the other hand I haven't measured your setup, only mine.
If you've got better places for me to look for the bottlenecks between typing and display, let me know.
Use a profiler. Really. Don't guess.
Cheers,
Christophe