LINUX.ORG.RU

История изменений

Исправление ados, (текущая версия) :

Ну круто. Поставил на эти рельсы run-with-buffering, пропатчил таким же образом run-perchar, добавил:

  (eval-when (:execute :compile-toplevel :load-toplevel)
    (proclaim '(optimize (safety 0) (debug 0) (speed 3)
                (compilation-speed 0) (space 0))))
  (declaim (optimize (safety 0) (debug 0) (speed 3)
                     (compilation-speed 0) (space 0)))

В начале файла. Наблюдаю значительное улучшение на том же самом файле:

PERCHAR-VS-BUFFERING> (with-open-file (*standard-input* #P"text3.tex")
                        (let ((lv (multiple-value-list (time (run-perchar)))))
                          (setf *x* lv)
                          (first lv)))
Evaluation took:
  2.664 seconds of real time
  2.664710 seconds of total run time (2.587150 user, 0.077560 system)
  100.04% CPU
  6,138,271,234 processor cycles
  7,799,248 bytes consed
  
114337080
PERCHAR-VS-BUFFERING> (defparameter *x2* *x*)
*X2*
PERCHAR-VS-BUFFERING> (let ((*buffer-size* (* 4 (expt 2 10))))
                        (with-open-file (*standard-input* #P"text3.tex")
                          (let ((lv (multiple-value-list (time (run-with-buffering)))))
                            (setf *x* lv)
                            (first lv))))
Evaluation took:
  1.961 seconds of real time
  1.962280 seconds of total run time (1.909503 user, 0.052777 system)
  100.05% CPU
  4,520,204,580 processor cycles
  7,766,016 bytes consed
  
114337080
PERCHAR-VS-BUFFERING> (equal *x* *x2*)
T
PERCHAR-VS-BUFFERING> 

Да получается, что про cl:position выше я чепухи нагородил.

Исправление ados, :

Ну круто. Поставил на эти рельсы run-with-buffering, пропатчил таким же образом run-perchar, добавил:

  (eval-when (:execute :compile-toplevel :load-toplevel)
    (proclaim '(optimize (safety 0) (debug 0) (speed 3)
                (compilation-speed 0) (space 0))))
  (declaim (optimize (safety 0) (debug 0) (speed 3)
                     (compilation-speed 0) (space 0)))

В начале файла. Наблюдаю значительное улучшение на том же самом файле:

PERCHAR-VS-BUFFERING> (with-open-file (*standard-input* #P"text3.tex")
                        (let ((lv (multiple-value-list (time (run-perchar)))))
                          (setf *x* lv)
                          (first lv)))
Evaluation took:
  2.673 seconds of real time
  2.674136 seconds of total run time (2.621646 user, 0.052490 system)
  100.04% CPU
  6,159,901,666 processor cycles
  7,767,456 bytes consed
  
114337080
PERCHAR-VS-BUFFERING> (defparameter *x2* *x*)
*X2*
PERCHAR-VS-BUFFERING> (let ((*buffer-size* (* 4 (expt 2 10))))
                        (with-open-file (*standard-input* #P"text3.tex")
                          (let ((lv (multiple-value-list (time (run-with-buffering)))))
                            (setf *x* lv)
                            (first lv))))
Evaluation took:
  3.160 seconds of real time
  3.160685 seconds of total run time (3.114486 user, 0.046199 system)
  100.03% CPU
  7,281,341,516 processor cycles
  7,763,856 bytes consed
  
114337080
PERCHAR-VS-BUFFERING> (equal *x* *x2*)
T
PERCHAR-VS-BUFFERING> 

Да получается, что про cl:position выше я чепухи нагородил.

Исходная версия ados, :

Ну круто. Поставил на эти рельсы run-with-buffering, пропатчил таким же образом run-perchar, добавил:

  (eval-when (:execute :compile-toplevel :load-toplevel)
    (proclaim '(optimize (safety 0) (debug 0) (speed 3)
                (compilation-speed 0) (space 0))))
  (declaim (optimize (safety 0) (debug 0) (speed 3)
                     (compilation-speed 0) (space 0)))

В начале файла. Наблюдаю значительное улучшение:

PERCHAR-VS-BUFFERING> (with-open-file (*standard-input* #P"text3.tex")
                        (let ((lv (multiple-value-list (time (run-perchar)))))
                          (setf *x* lv)
                          (first lv)))
Evaluation took:
  2.673 seconds of real time
  2.674136 seconds of total run time (2.621646 user, 0.052490 system)
  100.04% CPU
  6,159,901,666 processor cycles
  7,767,456 bytes consed
  
114337080
PERCHAR-VS-BUFFERING> (defparameter *x2* *x*)
*X2*
PERCHAR-VS-BUFFERING> (let ((*buffer-size* (* 4 (expt 2 10))))
                        (with-open-file (*standard-input* #P"text3.tex")
                          (let ((lv (multiple-value-list (time (run-with-buffering)))))
                            (setf *x* lv)
                            (first lv))))
Evaluation took:
  3.160 seconds of real time
  3.160685 seconds of total run time (3.114486 user, 0.046199 system)
  100.03% CPU
  7,281,341,516 processor cycles
  7,763,856 bytes consed
  
114337080
PERCHAR-VS-BUFFERING> (equal *x* *x2*)
T
PERCHAR-VS-BUFFERING> 

Да получается, что про cl:position выше я чепухи нагородил.