From: Pete K. <pet...@ka...> - 2005-01-21 00:42:46
|
I'm getting terrible execution times and consing when using cl-ppcre with an SBCL that has unicode support compiled in. When I recompile without unicode support (per Edi's suggestion), things work fine again. Here are the times with unicode support: PGW> (time (parse-file "/tmp/sample")) ; SBCL 0.8.18.23 Evaluation took: 2.984 seconds of real time 1.81 seconds of user run time 1.12 seconds of system run time 0 page faults and 228,191,424 bytes consed. And here are the times without unicode support: PGW> (time (parse-file "/tmp/sample")) ; SBCL 0.8.18.36 Evaluation took: 0.112 seconds of real time 0.04 seconds of user run time 0.0 seconds of system run time 0 page faults and 469,000 bytes consed. I'm a lisp newbie so I am not sure if I can provide much help in troubleshooting, but this is the function I was using: (defun parse-file (file) (with-open-file (in file) (do ((line (read-line in nil :eof) (read-line in nil :eof))) ((eql line :eof) t) (cl-ppcre:do-register-groups ((#'intern host)) ("^(?:\\S+ ){7}(\\S+)\\s+- commAlarm" line) ;;(format t "Found host ~A~%" host) )))) The input file consists of 51 lines of the following (note: its should be one line albeit a long one): 1105243179 11 Sun Jan 09 03:59:39 2005 scnyc06.ivanet.net - commAlarm ovnyc= 00p.ov.ivanet.net [1] private.enterprises.2496.1.1.5.5.1.0 (Integer): 0 [2= ] private.enterprises.2496.1.1.5.5.2.0 (Integer): 53 [3] private.enterpris= es.2496.1.1.5.5.3.0 (OctetString): ISUP: UNEQUIPPED CIC [4] private.enterp= rises.2496.1.1.5.5.4.0 (OctetString): ISDN User Part Msg received on unequi= pped CIC [5] private.enterprises.2496.1.1.5.5.5.0 (Integer): 2 [6] privat= e.enterprises.2496.1.1.5.5.6.0 (Integer): 1 [7] private.enterprises.2496.1= .1.5.5.7.0 (Integer): 1 [8] private.enterprises.2496.1.1.5.5.8.0 (Integer)= : 2 [9] private.enterprises.2496.1.1.1.1.1.1.1.1.1.1376257 (Integer): 1376= 257 [10] private.enterprises.2496.1.1.1.1.1.1.1.1.2.1376257 (Integer): 21 = [11] private.enterprises.2496.1.1.1.1.1.1.1.1.4.1376257 (OctetString): ss7= path-telednmk [12] private.enterprises.2496.1.1.1.1.1.1.1.1.5.1376257 (Oct= etString): SS7path for Teledenmark DPC 5.47.96 [13] private.enterprises.24= 96.1.1.1.1.1.1.1.1.3.1376257 (Integer): 1245186 [14] private.enterprises.2= 496.1.1.5.5.9.0 (Integer): 1105242782;1 .1.3.6.1.4.1.2496.1.1.4.1 0 Thanks, Pete |