[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: File output performance
If there are a lot of rows/columns, this line will hurt you fairly badly:
(format FILE-STREAM "~S"
(nth COLUMN-NUMBER (assoc ROW-NUMBER (DATA TABLE-SYMBOL))))
Both nth and cdr are O(n) operations, where n is the # of elements in
the list being traversed. It looks to me like you should be using 2
dimensional arrays and hash tables for optimal performance from LISP.
Aside from that, I/O is still blindingly slow in MCL. Just for
comparison sake, I wrote some I/O stuff in C that I had already done in
MCL. It took about 1/50 the time (no kidding).
Blaine.