The cl-performance-tuning-helper Reference Manual

Table of Contents

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 2.4 "Will Decker" on Wed Jun 20 11:18:46 2018 GMT+0.


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

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.


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

2 Systems

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


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

2.1 cl-performance-tuning-helper

Maintainer

SUZUKI Shingo

Author

SUZUKI Shingo

License

MIT

Description

A simple performance tuning helper tool box for Common Lisp

Version

0.3.0

Source

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

Component

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


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

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


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 cl-performance-tuning-helper.asd

Location

cl-performance-tuning-helper.asd

Systems

cl-performance-tuning-helper (system)

Packages

cl-performance-tuning-helper-asd


Previous: , Up: Lisp files   [Contents][Index]

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

Parent

cl-performance-tuning-helper (system)

Location

cl-performance-tuning-helper.lisp

Packages

cl-performance-tuning-helper

Exported Definitions

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

4 Packages

Packages are listed by definition order.


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

4.1 cl-performance-tuning-helper-asd

Source

cl-performance-tuning-helper.asd

Use List

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

4.2 cl-performance-tuning-helper

Source

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

Nickname

pth

Use List

common-lisp

Exported Definitions

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

5 Definitions

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


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

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

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 (file)

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 (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Functions

Function: asmout FUN &optional PATH

output DISASSEMBLE result into a file

Package

cl-performance-tuning-helper

Source

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

Function: cload PATH

load after compile a file

Package

cl-performance-tuning-helper

Source

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


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   C   F   L  
Index Entry  Section

C
cl-performance-tuning-helper.asd: The cl-performance-tuning-helper<dot>asd file
cl-performance-tuning-helper/cl-performance-tuning-helper.lisp: The cl-performance-tuning-helper/cl-performance-tuning-helper<dot>lisp file

F
File, Lisp, cl-performance-tuning-helper.asd: The cl-performance-tuning-helper<dot>asd file
File, Lisp, cl-performance-tuning-helper/cl-performance-tuning-helper.lisp: The cl-performance-tuning-helper/cl-performance-tuning-helper<dot>lisp file

L
Lisp File, cl-performance-tuning-helper.asd: The cl-performance-tuning-helper<dot>asd file
Lisp File, cl-performance-tuning-helper/cl-performance-tuning-helper.lisp: The cl-performance-tuning-helper/cl-performance-tuning-helper<dot>lisp file

Jump to:   C   F   L  

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

A.2 Functions

Jump to:   A   C   F   M   P   T  
Index Entry  Section

A
asmout: Exported functions

C
cload: Exported functions

F
Function, asmout: Exported functions
Function, cload: Exported functions

M
Macro, performance: Exported macros
Macro, trash-outputs: Exported macros

P
performance: Exported macros

T
trash-outputs: Exported macros

Jump to:   A   C   F   M   P   T  

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

A.3 Variables


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

A.4 Data types

Jump to:   C   P   S  
Index Entry  Section

C
cl-performance-tuning-helper: The cl-performance-tuning-helper system
cl-performance-tuning-helper: The cl-performance-tuning-helper package
cl-performance-tuning-helper-asd: The cl-performance-tuning-helper-asd package

P
Package, cl-performance-tuning-helper: The cl-performance-tuning-helper package
Package, cl-performance-tuning-helper-asd: The cl-performance-tuning-helper-asd package

S
System, cl-performance-tuning-helper: The cl-performance-tuning-helper system

Jump to:   C   P   S