;;
;; test-perf.scm — Benchmark parallel parsing performance
;;
(format #t "~%═══ PERFORMANCE BENCHMARK ═══~%~%")
;; Reset state
(corpus-reset)
;; Time a 5000 sentence run
(let ((t0 (get-internal-real-time)))
(run-corpus 5000)
(let* ((t1 (get-internal-real-time))
(elapsed-s (/ (- t1 t0) 1000000000.0)))
(format #t "~%═══ BENCHMARK RESULTS ═══~%")
(format #t " Total time: ~,1f seconds~%" elapsed-s)
(format #t " Sentences processed: ~a~%" *cl-total-sentences*)
(format #t " Throughput: ~,1f sentences/sec~%"
(/ *cl-total-sentences* elapsed-s))
(format #t " Total learns: ~a (~,1f%)~%"
*cl-total-learns*
(* 100.0 (/ *cl-total-learns* (max 1 *cl-total-sentences*))))
(format #t " Processor count: ~a~%" (total-processor-count))
(format #t "═══════════════════════════~%~%")))