[cl-pdf-devel] cl-pdf with salza
Dmitriy Ivanov
divanov at aha.ru
Tue Apr 12 07:34:13 UTC 2005
Hello Marc,
| "Dmitriy Ivanov" <divanov at aha.ru> wrote:
|
|> I have managed to improve SALZA performance on LW 4.4 slightly using
| sys:int32
|> arithmetic. See the bunch of the changed files attached. I have had to
|> change the order of source files in the system definition - look at my
|> defsys.lisp.
|>
|> Below is the excerpt from the simple test case.
|>
|> (setq size 100000
|> src (make-array size :element-type '(unsigned-byte 8)))
|> (dotimes (i size) (setf (aref src i) (random 256))))
|>
|> ;#-lw-int32
|> (extended-time (progn (setq v1 (zlib:compress-sequence src)) (length
|> v1))) ;user time = 0.421 ;system time = 0.000 ;Elapsed
|> time = 0:00:00 ;Allocation = 10759576 bytes standard / 2057 bytes
|> conses ;#+lw-int32 (extended-time (progn (setq v2
|> (zlib:compress-sequence src)) (length v2))) ;user time = 0.234
|> ;system time = 0.000
|> ;Elapsed time = 0:00:00
|> ;Allocation = 4200024 bytes standard / 4499 bytes conses
|
| Very cool. Now it should be much faster than using the FLI zlib.
My latest amended version of salza.zip is available at http://lisp.ystok.ru/cl-pdf.html
Further improvements:
1) Small code changes in types.lisp and compressor.lisp.
2) In compress-sequence (zlib.lisp), binding output to the specialized
vector
(make-array 0 :adjustable t :element-type 'octet)
instead of a general one gives a considerable benefit:
;user time = 0.140
;system time = 0.000
;Elapsed time = 0:00:00
;Allocation = 1617240 bytes standard / 5599 bytes conses
One week point: the current version sets the compression level rigidly
(defconstant +zlib-compression-level+ 2),
which seems a bit low (for example, GNU ZLIB provides 6 by default).
Is there any plans to advance in that direction, Zachary?
--
Sincerely,
Dmitriy Ivanov
lisp.ystok.ru
More information about the cl-pdf-devel
mailing list