Hi Alex,

Thank you. The (profile) tool is exactly what was needed here

In the scaling loops, it made more of a difference than I thought  to copy
object properties into local variables.

However, the idx tree change you pointed out is what helped most.

: (prog (setq Msg (make (do (** 2 16) (link (rand (char "A") (char
"Z")))))) (length Msg))
-> 65536
: (bench (/ (length (ACDC_Compress Msg)) 8))
2.761 sec
-> 38785
: (bench (= Msg (ACDC_Decompress (ACDC_Compress Msg))))
5.478 sec
-> T

Initially those numbers were larger by a factor of 5

I am sure there is lot more I will find to optimize as a I explore a bit
more.

/Lindsay



# 1Mb list
: (prog (setq Msg (make (do (** 2 20) (link (rand (char "A") (char
"Z")))))) (length Msg))
-> 1048576
: (bench (= Msg (ACDC_Decompress (ACDC_Compress Msg))))

73.807 sec
-> T
: (mapc prof ...-> NIL
: (bench (/ (length (ACDC_Compress Msg)) 8))
36.574 sec
-> 616497

: (profile)
(2492 217 computeLower> . +ACDC_BasicModel)
(602 48 emit> . +ACDC_BasicModel)
(137 10 ACDC_Compress)
(129 8 update> . +ACDC_BasicModel)
(0 0 emitEof> . +ACDC_BasicModel)
-> (0 0 emitEof> . +ACDC_BasicModel)

Reply via email to