The cl-performance-tuning-helper Reference Manual

Next: , Previous: , Up: (dir)   [Contents][Index]

The cl-performance-tuning-helper Reference Manual

This is the cl-performance-tuning-helper Reference Manual, version 0.3.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Aug 15 03:54:39 2022 GMT+0.

Table of Contents


1 Introduction

A simple performance tuning helper tool box for Common Lisp

APIs:

Function CLOAD:

load a file after compile.

e.g. (pth:cload "src") for compile and load "src.lisp".

Function ASMOUT:

save DISASSEMBLE result for given function into a file. You can specify saving filename optionally.

When a function is given as an symbol s.t. 'SOME-FUNCTION, the default filename is a lowercase version of the symbol name with ".asm" suffix.

e.g. (pth:asmout 'SOME-PACKAGE:SOME-FUNCTION)

saves DISASSEMBLE result for #'SOME-PACKAGE:SOME-FUNCTION into "some-function.asm".

When a function is given as a lambda expression or a function itself (i.e. #'SOME-FUNCTION or (SYMBOL-FUNCTION 'SOME-FUNCTION)), you must specify filename explicitly.

e.g. (pth:asmout (lambda (x y) (+ x y)) "binary-add.asm")

saves DISASSEMBLE result of a given lambda expression into "binary-add.asm". In this case, suffix (".asm") is not appended automatically.

Macro PERFORMANCE:

simple performance checker.

e.g. 1 (pth:performance 100 debugger-p (some-function args...))

tries to eval SOME-FUNCTION 100 times with specified args.

After all, displays execution information by TIME macro.

PTH:PERFORMANCE returns t if all eval has been done successfully.

When a condition has been signaled;

e.g. 2

target function also able to access current-num-repeats.

    (let ((max 5))
      (pth:performance (count max) nil
        (format t "~&~d of ~d~%" count max) ))
    ;;; performance test for FORMAT 5 times
    ;;;   do (FORMAT T "~&~d of ~d~%" COUNT MAX)
    0 of 5
    1 of 5
    2 of 5
    3 of 5
    4 of 5
    (and implementation dependant TIME macro result)
    ; => T

LICENSE:

under MIT license.


2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 cl-performance-tuning-helper

A simple performance tuning helper tool box for Common Lisp

Maintainer

SUZUKI Shingo

Author

SUZUKI Shingo

License

MIT

Version

0.3.0

Source

cl-performance-tuning-helper.asd.

Child Component

cl-performance-tuning-helper.lisp (file).


3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


3.1.1 cl-performance-tuning-helper/cl-performance-tuning-helper.asd

Source

cl-performance-tuning-helper.asd.

Parent Component

cl-performance-tuning-helper (system).

ASDF Systems

cl-performance-tuning-helper.

Packages

cl-performance-tuning-helper-asd.


3.1.2 cl-performance-tuning-helper/cl-performance-tuning-helper.lisp

Source

cl-performance-tuning-helper.asd.

Parent Component

cl-performance-tuning-helper (system).

Packages

cl-performance-tuning-helper.

Public Interface

4 Packages

Packages are listed by definition order.


4.1 cl-performance-tuning-helper

Source

cl-performance-tuning-helper.lisp.

Nickname

pth

Use List

common-lisp.

Public Interface

4.2 cl-performance-tuning-helper-asd

Source

cl-performance-tuning-helper.asd.

Use List
  • asdf/interface.
  • common-lisp.

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Previous: , Up: Definitions   [Contents][Index]

5.1 Public Interface


5.1.1 Macros

Macro: performance (num-repeats debugger-p (func &rest args))

do performance test with specified arguments

usage: (performance num-repeats debugger-p (function &rest args))

num-repeats: designates a number of repeats in positive integer.
If you want to reference current repeat count from testing function, you should specify num-repeats as following format:
(count-variable positive-integer).

debugger-p: designate enable to call debugger for ANY conditions.

function: a symbol of function or a lambda expression.

e.g.
(let ((max 5))
(pth:performance (i max) nil (format t "SAMPLE: ~d of ~d~%" i max)) ) => t
—-
;;; performance test for FORMAT MAX times
;;; do (FORMAT T "SAMPLE: ~d of ~d~%" I MAX)
SAMPLE: 0 of 5
SAMPLE: 1 of 5
SAMPLE: 2 of 5
SAMPLE: 3 of 5
SAMPLE: 4 of 5

(and following platform dependant output of TIME function)

Package

cl-performance-tuning-helper.

Source

cl-performance-tuning-helper.lisp.

Macro: trash-outputs (&body body)

trash system stream outputs: *standard-output*, *error-output*,
and *trace-output*.

Package

cl-performance-tuning-helper.

Source

cl-performance-tuning-helper.lisp.


Previous: , Up: Public Interface   [Contents][Index]

5.1.2 Ordinary functions

Function: asmout (fun &optional path)

output DISASSEMBLE result into a file

Package

cl-performance-tuning-helper.

Source

cl-performance-tuning-helper.lisp.

Function: cload (path)

load after compile a file

Package

cl-performance-tuning-helper.

Source

cl-performance-tuning-helper.lisp.


Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts


Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables