more documentation
decrease sleep time => 14.2 fps

(36 54 11 14 7 2014 0 NIL 0)

Number of samples:   26
Sample interval:     0.01 seconds
Total sampling time: 0.26 seconds
Number of cycles:    0
Sampled threads:
 #<SB-THREAD:THREAD "worker" RUNNING {1015025E83}>

           Self        Total        Cumul
  Nr  Count     %  Count     %  Count     %    Calls  Function
------------------------------------------------------------------------
   1     12  46.2     12  46.2     12  46.2        -  "foreign function syscall"
   2      8  30.8      8  30.8     20  76.9        -  (FLET #:CLEANUP-FUN-586 :IN SB-THREAD::CALL-WITH-SYSTEM-MUTEX)
   3      2   7.7      2   7.7     22  84.6        -  "foreign function __nanosleep"
   4      1   3.8     10  38.5     23  88.5        -  SB-THREAD:MAKE-THREAD
   5      1   3.8      1   3.8     24  92.3        -  "foreign function open64"
   6      1   3.8      1   3.8     25  96.2        -  SB-IMPL::OUTPUT-BYTES/ASCII
   7      1   3.8      1   3.8     26 100.0        -  SB-THREAD:MAKE-MUTEX
   8      0   0.0     26 100.0     26 100.0        -  RUN-RAW
   9      0   0.0     26 100.0     26 100.0        -  "Unknown component: #x1015156F50"
  10      0   0.0     26 100.0     26 100.0        -  SB-EXT:CALL-WITH-TIMING
  11      0   0.0     26 100.0     26 100.0        -  SB-INT:SIMPLE-EVAL-IN-LEXENV
  12      0   0.0     26 100.0     26 100.0        -  EVAL
  13      0   0.0     26 100.0     26 100.0        -  (LAMBDA NIL :IN SWANK:INTERACTIVE-EVAL)
  14      0   0.0     26 100.0     26 100.0        -  SWANK::CALL-WITH-RETRY-RESTART
  15      0   0.0     26 100.0     26 100.0        -  SWANK::CALL-WITH-BUFFER-SYNTAX
  16      0   0.0     26 100.0     26 100.0        -  SWANK:EVAL-FOR-EMACS
  17      0   0.0     26 100.0     26 100.0        -  (LAMBDA NIL :IN SWANK::SPAWN-WORKER-THREAD)
  18      0   0.0     26 100.0     26 100.0        -  SWANK-BACKEND::CALL-WITH-BREAK-HOOK
  19      0   0.0     26 100.0     26 100.0        -  (FLET SWANK-BACKEND:CALL-WITH-DEBUGGER-HOOK :IN "/home/martin/quicklisp/dists/quicklisp/software/slime-2.7/swank-sbcl.lisp")
  20      0   0.0     26 100.0     26 100.0        -  SWANK::CALL-WITH-BINDINGS
  21      0   0.0     26 100.0     26 100.0        -  (FLET #:WITHOUT-INTERRUPTS-BODY-1210 :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE)
  22      0   0.0     26 100.0     26 100.0        -  (FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE)
  23      0   0.0     26 100.0     26 100.0        -  (FLET #:WITHOUT-INTERRUPTS-BODY-645 :IN SB-THREAD::CALL-WITH-MUTEX)
  24      0   0.0     26 100.0     26 100.0        -  SB-THREAD::CALL-WITH-MUTEX
  25      0   0.0     26 100.0     26 100.0        -  SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE
  26      0   0.0     26 100.0     26 100.0        -  "foreign function call_into_lisp"
  27      0   0.0     26 100.0     26 100.0        -  "foreign function new_thread_trampoline"
  28      0   0.0     12  46.2     26 100.0        -  SB-THREAD::%%WAIT-FOR-MUTEX
  29      0   0.0     12  46.2     26 100.0        -  SB-THREAD::%WAIT-FOR-MUTEX
  30      0   0.0     12  46.2     26 100.0        -  (FLET #:WITHOUT-INTERRUPTS-BODY-1286 :IN SB-THREAD:JOIN-THREAD)
  31      0   0.0     12  46.2     26 100.0        -  SB-THREAD:JOIN-THREAD
  32      0   0.0      8  30.8     26 100.0        -  SB-THREAD::CALL-WITH-SYSTEM-MUTEX
  33      0   0.0      2   7.7     26 100.0        -  ARDUINO-SERIAL-SBCL:TALK-ARDUINO
  34      0   0.0      1   3.8     26 100.0        -  SLEEP
  35      0   0.0      1   3.8     26 100.0        -  SB-IMPL::FD-SOUT
  36      0   0.0      1   3.8     26 100.0        -  SB-IMPL::%WRITE-STRING
  37      0   0.0      1   3.8     26 100.0        -  (LABELS SB-IMPL::HANDLE-IT :IN SB-KERNEL:OUTPUT-OBJECT)
  38      0   0.0      1   3.8     26 100.0        -  PRINC
  39      0   0.0      1   3.8     26 100.0        -  ARDUINO-SERIAL-SBCL::WRITE-ARDUINO
  40      0   0.0      1   3.8     26 100.0        -  SB-THREAD::%MAKE-THREAD
------------------------------------------------------------------------
          0   0.0                                     elsewhere
(9 55 11 14 7 2014 0 NIL 0)
Evaluation took:
  33.363 seconds of real time
  4.233000 seconds of total run time (1.355000 user, 2.878000 system)
  12.69% CPU
  93,843,465,402 processor cycles
  2,403,344 bytes consed
apparently 'int' is 32bit in gcc (even for amd64 architecture)
i don't see any way to improve speed with triggering beyond 14.2fps
perhaps i will have to change integration time
Number of samples:   31
Sample interval:     0.01 seconds
Total sampling time: 0.31 seconds
Number of cycles:    0
Sampled threads:
 #<SB-THREAD:THREAD "worker" RUNNING {1014156143}>

           Self        Total        Cumul
  Nr  Count     %  Count     %  Count     %    Calls  Function
------------------------------------------------------------------------
   1      6  19.4      6  19.4      6  19.4        -  "foreign function syscall"
   2      5  16.1      5  16.1     11  35.5        -  (FLET #:CLEANUP-FUN-586 :IN SB-THREAD::CALL-WITH-SYSTEM-MUTEX)
   3      3   9.7      3   9.7     14  45.2        -  "foreign function ioctl"
   4      2   6.5      2   6.5     16  51.6        -  "foreign function open64"
   5      2   6.5      2   6.5     18  58.1        -  SB-ALIEN-INTERNALS:ALIEN-SUBTYPE-P
   6      2   6.5      2   6.5     20  64.5        -  (FLET #:CLEANUP-FUN-2067 :IN SB-IMPL::REFILL-INPUT-BUFFER)
   7      1   3.2     31 100.0     21  67.7        -  RUN-RAW
   8      1   3.2      5  16.1     22  71.0        -  ARDUINO-SERIAL-SBCL:SERIAL-RECV-LENGTH
   9      1   3.2      2   6.5     23  74.2        -  PPRINT-DISPATCH
  10      1   3.2      2   6.5     24  77.4        -  FINISH-OUTPUT
  11      1   3.2      2   6.5     25  80.6        -  ARDUINO-SERIAL-SBCL::ENSURE-RESPONSE-BUFFER-CLEAR
  12      1   3.2      1   3.2     26  83.9        -  SB-ALIEN::POINTER-SUBTYPEP-METHOD
  13      1   3.2      1   3.2     27  87.1        -  SB-ALIEN-INTERNALS:MAKE-ALIEN-VALUE
  14      1   3.2      1   3.2     28  90.3        -  SB-WALKER::PPRINT-DISPATCH-BACKQ-COMMA
  15      1   3.2      1   3.2     29  93.5        -  SB-UNIX:NANOSLEEP
  16      1   3.2      1   3.2     30  96.8        -  SB-KERNEL:TWO-ARG-<
  17      1   3.2      1   3.2     31 100.0        -  "foreign function write"
  18      0   0.0     31 100.0     31 100.0        -  "Unknown component: #x1014281F60"
  19      0   0.0     31 100.0     31 100.0        -  SB-EXT:CALL-WITH-TIMING
  20      0   0.0     31 100.0     31 100.0        -  SB-INT:SIMPLE-EVAL-IN-LEXENV
  21      0   0.0     31 100.0     31 100.0        -  EVAL
  22      0   0.0     31 100.0     31 100.0        -  (LAMBDA NIL :IN SWANK:INTERACTIVE-EVAL)
  23      0   0.0     31 100.0     31 100.0        -  SWANK::CALL-WITH-RETRY-RESTART
  24      0   0.0     31 100.0     31 100.0        -  SWANK::CALL-WITH-BUFFER-SYNTAX
  25      0   0.0     31 100.0     31 100.0        -  SWANK:EVAL-FOR-EMACS
  26      0   0.0     31 100.0     31 100.0        -  (LAMBDA NIL :IN SWANK::SPAWN-WORKER-THREAD)
  27      0   0.0     31 100.0     31 100.0        -  SWANK-BACKEND::CALL-WITH-BREAK-HOOK
  28      0   0.0     31 100.0     31 100.0        -  (FLET SWANK-BACKEND:CALL-WITH-DEBUGGER-HOOK :IN "/home/martin/quicklisp/dists/quicklisp/software/slime-2.7/swank-sbcl.lisp")
  29      0   0.0     31 100.0     31 100.0        -  SWANK::CALL-WITH-BINDINGS
  30      0   0.0     31 100.0     31 100.0        -  (FLET #:WITHOUT-INTERRUPTS-BODY-1210 :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE)
  31      0   0.0     31 100.0     31 100.0        -  (FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE)
  32      0   0.0     31 100.0     31 100.0        -  (FLET #:WITHOUT-INTERRUPTS-BODY-645 :IN SB-THREAD::CALL-WITH-MUTEX)
  33      0   0.0     31 100.0     31 100.0        -  SB-THREAD::CALL-WITH-MUTEX
  34      0   0.0     31 100.0     31 100.0        -  SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE
  35      0   0.0     31 100.0     31 100.0        -  "foreign function call_into_lisp"
  36      0   0.0     31 100.0     31 100.0        -  "foreign function new_thread_trampoline"
  37      0   0.0     16  51.6     31 100.0        -  ARDUINO-SERIAL-SBCL:TALK-ARDUINO
  38      0   0.0      6  19.4     31 100.0        -  SB-THREAD::%%WAIT-FOR-MUTEX
  39      0   0.0      6  19.4     31 100.0        -  SB-THREAD::%WAIT-FOR-MUTEX
  40      0   0.0      6  19.4     31 100.0        -  (FLET #:WITHOUT-INTERRUPTS-BODY-1286 :IN SB-THREAD:JOIN-THREAD)
  41      0   0.0      6  19.4     31 100.0        -  SB-THREAD:JOIN-THREAD
  42      0   0.0      5  16.1     31 100.0        -  SB-THREAD::CALL-WITH-SYSTEM-MUTEX
  43      0   0.0      5  16.1     31 100.0        -  SB-THREAD:MAKE-THREAD
  44      0   0.0      3   9.7     31 100.0        -  SB-POSIX::ALIEN-POINTER-TO-ANYTHING-OR-NIL
  45      0   0.0      2   6.5     31 100.0        -  SB-PRETTY:OUTPUT-PRETTY-OBJECT
  46      0   0.0      2   6.5     31 100.0        -  (LABELS SB-IMPL::HANDLE-IT :IN SB-KERNEL:OUTPUT-OBJECT)
  47      0   0.0      2   6.5     31 100.0        -  PRINC
  48      0   0.0      2   6.5     31 100.0        -  ARDUINO-SERIAL-SBCL::WRITE-ARDUINO
  49      0   0.0      2   6.5     31 100.0        -  SB-IMPL::REFILL-INPUT-BUFFER
  50      0   0.0      2   6.5     31 100.0        -  SB-IMPL::INPUT-CHAR/ASCII
  51      0   0.0      2   6.5     31 100.0        -  READ-CHAR
  52      0   0.0      2   6.5     31 100.0        -  ARDUINO-SERIAL-SBCL:READ-RESPONSE
  53      0   0.0      1   3.2     31 100.0        -  SB-VM::GENERIC-+
  54      0   0.0      1   3.2     31 100.0        -  SLEEP
  55      0   0.0      1   3.2     31 100.0        -  SB-UNIX:UNIX-WRITE
  56      0   0.0      1   3.2     31 100.0        -  SB-IMPL::FLUSH-OUTPUT-BUFFER
  57      0   0.0      1   3.2     31 100.0        -  SB-IMPL::FINISH-FD-STREAM-OUTPUT
------------------------------------------------------------------------
          0   0.0                                     elsewhere
(51 26 12 14 7 2014 0 NIL 0)
Evaluation took:
  33.397 seconds of real time
  4.478000 seconds of total run time (1.571000 user, 2.907000 system)
  13.41% CPU
  93,939,527,811 processor cycles
  3,486,176 bytes consed
scan step 100 with fft no dark correction and windowing

(16 40 12 14 7 2014 0 NIL 0)

Number of samples:   74
Sample interval:     0.01 seconds
Total sampling time: 0.74 seconds
Number of cycles:    0
Sampled threads:
 #<SB-THREAD:THREAD "worker" RUNNING {1016969113}>

           Self        Total        Cumul
  Nr  Count     %  Count     %  Count     %    Calls  Function
------------------------------------------------------------------------
   1     61  82.4     61  82.4     61  82.4        -  "foreign function syscall"
   2      4   5.4      4   5.4     65  87.8        -  (FLET #:CLEANUP-FUN-586 :IN SB-THREAD::CALL-WITH-SYSTEM-MUTEX)
   3      3   4.1      3   4.1     68  91.9        -  "foreign function __nanosleep"
   4      2   2.7      2   2.7     70  94.6        -  SB-ALIEN::POINTER-SUBTYPEP-METHOD
   5      1   1.4     62  83.8     71  95.9        -  SB-THREAD::%%WAIT-FOR-MUTEX
   6      1   1.4      7   9.5     72  97.3        -  ARDUINO-SERIAL-SBCL:TALK-ARDUINO
   7      1   1.4      1   1.4     73  98.6        -  SB-IMPL::OUTPUT-BYTES/ASCII
   8      1   1.4      1   1.4     74 100.0        -  SB-ALIEN::ALIEN-TYPE-CLASS-OR-LOSE
   9      0   0.0     74 100.0     74 100.0        -  RUN
  10      0   0.0     74 100.0     74 100.0        -  "Unknown component: #x1016A97480"
  11      0   0.0     74 100.0     74 100.0        -  SB-EXT:CALL-WITH-TIMING
  12      0   0.0     74 100.0     74 100.0        -  SB-INT:SIMPLE-EVAL-IN-LEXENV
  13      0   0.0     74 100.0     74 100.0        -  EVAL
  14      0   0.0     74 100.0     74 100.0        -  (LAMBDA NIL :IN SWANK:INTERACTIVE-EVAL)
  15      0   0.0     74 100.0     74 100.0        -  SWANK::CALL-WITH-RETRY-RESTART
  16      0   0.0     74 100.0     74 100.0        -  SWANK::CALL-WITH-BUFFER-SYNTAX
  17      0   0.0     74 100.0     74 100.0        -  SWANK:EVAL-FOR-EMACS
  18      0   0.0     74 100.0     74 100.0        -  (LAMBDA NIL :IN SWANK::SPAWN-WORKER-THREAD)
  19      0   0.0     74 100.0     74 100.0        -  SWANK-BACKEND::CALL-WITH-BREAK-HOOK
  20      0   0.0     74 100.0     74 100.0        -  (FLET SWANK-BACKEND:CALL-WITH-DEBUGGER-HOOK :IN "/home/martin/quicklisp/dists/quicklisp/software/slime-2.7/swank-sbcl.lisp")
  21      0   0.0     74 100.0     74 100.0        -  SWANK::CALL-WITH-BINDINGS
  22      0   0.0     74 100.0     74 100.0        -  (FLET #:WITHOUT-INTERRUPTS-BODY-1210 :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE)
  23      0   0.0     74 100.0     74 100.0        -  (FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE)
  24      0   0.0     74 100.0     74 100.0        -  (FLET #:WITHOUT-INTERRUPTS-BODY-645 :IN SB-THREAD::CALL-WITH-MUTEX)
  25      0   0.0     74 100.0     74 100.0        -  SB-THREAD::CALL-WITH-MUTEX
  26      0   0.0     74 100.0     74 100.0        -  SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE
  27      0   0.0     74 100.0     74 100.0        -  "foreign function call_into_lisp"
  28      0   0.0     74 100.0     74 100.0        -  "foreign function new_thread_trampoline"
  29      0   0.0     62  83.8     74 100.0        -  SB-THREAD::%WAIT-FOR-MUTEX
  30      0   0.0     62  83.8     74 100.0        -  (FLET #:WITHOUT-INTERRUPTS-BODY-1286 :IN SB-THREAD:JOIN-THREAD)
  31      0   0.0     62  83.8     74 100.0        -  SB-THREAD:JOIN-THREAD
  32      0   0.0      4   5.4     74 100.0        -  SB-THREAD::CALL-WITH-SYSTEM-MUTEX
  33      0   0.0      4   5.4     74 100.0        -  SB-THREAD:MAKE-THREAD
  34      0   0.0      3   4.1     74 100.0        -  SB-POSIX::ALIEN-POINTER-TO-ANYTHING-OR-NIL
  35      0   0.0      3   4.1     74 100.0        -  ARDUINO-SERIAL-SBCL:SERIAL-RECV-LENGTH
  36      0   0.0      2   2.7     74 100.0        -  SLEEP
  37      0   0.0      1   1.4     74 100.0        -  SB-IMPL::FD-SOUT
  38      0   0.0      1   1.4     74 100.0        -  SB-IMPL::%WRITE-STRING
  39      0   0.0      1   1.4     74 100.0        -  (LABELS SB-IMPL::HANDLE-IT :IN SB-KERNEL:OUTPUT-OBJECT)
  40      0   0.0      1   1.4     74 100.0        -  PRINC
  41      0   0.0      1   1.4     74 100.0        -  ARDUINO-SERIAL-SBCL::WRITE-ARDUINO
  42      0   0.0      1   1.4     74 100.0        -  SB-ALIEN-INTERNALS:ALIEN-SUBTYPE-P
------------------------------------------------------------------------
          0   0.0                                     elsewhere
(8 41 12 14 7 2014 0 NIL 0)
Evaluation took:
  51.464 seconds of real time
  45.533000 seconds of total run time (44.967000 user, 0.566000 system)
  88.48% CPU
  144,755,489,879 processor cycles
  323,443,936 bytes consed