>>>>> "Rupert" == Rupert Swarbrick <rswarbrick at gmail.com> writes:
Rupert> (2) Ray, is there any way you can easily work out what the sparc is
Rupert> spending all it's time on? (with the new code) Running the first
Rupert> code snippet below with profile:profile-all would probably tell me
Rupert> a lot. If you can, could you use (topic-match "foo" t) and
Rupert> (topic-match "foo" nil) and let me know the difference?
Rupert> Gory details:
Rupert> =============
Rupert> Firstly, I used the deterministic profilers on SBCL and CMUCL, running
Rupert> (progn
Rupert> (setf *documents* nil)
Rupert> (pushnew (info-pathname nil) *deferred-documents*)
Rupert> (topic-match "Number Theory" t))
Rupert> ten times each. The top of the results:
CL-INFO> (profile:report-time)
Consed | Calls | Secs | Sec/Call | Bytes/C. | Name:
-----------------------------------------------------------------------
5,543,744 | 2 | 1.710 | 0.85500 | 2,771,872 | THIS-DOC-MATCHES
4,785,104 | 2 | 1.100 | 0.55000 | 2,392,552 | SCAN-INFO-FILE
1,614,160 | 20,692 | 1.079 | 0.00005 | 78 | STARTS-WITH-P
4,296,944 | 2 | 1.030 | 0.51500 | 2,148,472 | READ-INFO-INDEX
3,124,144 | 5,542 | 1.019 | 0.00018 | 564 | STRIP-SECTION-TITLE
510,016 | 4,858 | 0.250 | 0.00005 | 105 | MAYBE-UPDATED-INDEX-ENTRY
It's quite different now since I updated the code earlier. Still
slow. I'll have to look at the code. Later.
Rupert> (defvar *regex*
Rupert> (coerce
Rupert> (maxima-nregex::regex-compile
Rupert> "Number Theory" :case-sensitive nil) 'function))
This means *regex* is not compiled.
Rupert> and on CMUCL:
Rupert> ; Evaluation took:
Rupert> ; 2.5f0 seconds of real time
Rupert> ; 2.444f0 seconds of user run time
Rupert> ; 0.052f0 seconds of system run time
Rupert> ; 5,734,503,475 CPU cycles
Rupert> ; [Run times include 0.09f0 seconds GC run time]
Rupert> ; 0 page faults and
Rupert> ; 111,166,664 bytes consed.
So perhaps this isn't so surprising.
Ray