/mobile Handheld Friendly website

 performance measurements

Each table row shows performance measurements for this Lisp SBCL program with a particular command-line input value N.

 N  CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
250,0000.510.52138,3082301  0% 0% 4% 98%
2,500,0003.833.84138,3082301  1% 0% 2% 100%
25,000,00036.9737.01138,3082301  0% 0% 0% 100%

Read the ↓ make, command line, and program output logs to see how this program was run.

Read k-nucleotide benchmark to see what this program should do.

 notes

This is SBCL 1.1.7, an implementation of ANSI Common Lisp.

 k-nucleotide Lisp SBCL #5 program source code

;; The Computer Language Benchmarks Game

;;   http://benchmarksgame.alioth.debian.org/

;;

;;   contributed by Alexey Voznyuk

;;;

;;; modified by Marko Kocic 

;;;   * add optimization declarations


(defpackage #:k-nucleotide
  (:use :cl))

(in-package :k-nucleotide)

(declaim (optimize (speed 3)(safety 0)(space 0)(debug 0)))

(defmacro with-packed-sequences ((&rest sequences) &body body)
  (loop :for (bind update length) :in sequences
     :collect `(,bind 0) :into binds
     :collect `(type (integer 0 ,(1- (expt 4 length))) ,bind) :into decls
     :collect `(,update (char) `(setf ,',bind
                                      (logior (ash ,',bind -2)
                                              (ash (logand (char-code ,char) #x6)
                                                   ,',(1- (* (1- length) 2)))))) :into updates
     :finally (return `(let (,@binds) (declare ,@decls) (macrolet (,@updates) ,@body)))))

(defmacro pack-sequence (sequence)
  `(with-packed-sequences ((bind update ,(length sequence)))
     (loop :for char :across ,sequence
        :do (update char))
     bind))

(defun unpack-sequence (length packed-seq)
  (declare (optimize (speed 3) (safety 0) (debug 0))
           (type fixnum length packed-seq))
  (with-output-to-string (seq-out)
    (loop :repeat length
       :do (write-char (ecase (logand packed-seq #x3)
                         (0 #\A) (1 #\C) (2 #\T) (3 #\G))
                       seq-out)
       :do (setf packed-seq (ash packed-seq -2)))))

(defmacro with-packed-caches-fill ((hash-access) &rest updaters)
  `(progn ,@(loop
               :for tick :from 1 :to (apply #'max (mapcar #'third updaters))
               :collect `(with-current-char (char :skip-newline t)
                           ,@(loop :for (bind update length) :in updaters
                                :collect `(,update char)
                                :when (>= tick length)
                                :collect `(,hash-access ,length ,bind))))))

(defmacro with-reading-stream ((stream &key (block-size 8192)) &body body)
  `(block outer-tag
     (let ((advance (let ((buffer (make-array ,block-size :element-type 'standard-char :initial-element #\Newline))
                          (index 0)
                          (amount 0))
                      (declare (type fixnum index amount))
                      (lambda ()
                        (prog2 (when (>= index amount)
                                 (setf amount (read-sequence buffer ,stream)
                                       index 0)
                                 (when (zerop amount)
                                   (return-from outer-tag nil)))
                            (elt buffer index)
                          (incf index))))))
       (flet ((get-char () (funcall advance)))
         (macrolet ((with-current-char ((char &key skip-newline) &body body)
                      `(let ((,char ,(if skip-newline
                                         `(loop :for ,char = (get-char) :while (char= ,char #\Newline)
                                             :finally (return ,char))
                                         `(get-char))))
                         (declare (type standard-char ,char))
                         ,@body)))
           ,@body)))))

(defmacro skip-buffer-to (&rest patterns)
  `(progn ,@(loop :for pattern :in patterns
               :collect `(loop :until (and ,@(loop :for char :across (string pattern)
                                                :collect `(with-current-char (char)
                                                            (char= char ,char))))))))

(defmacro with-dna-analyzed ((stream hash-access &key (block-size 8192)) &rest sequence-lengths)
  (loop :for length :in sequence-lengths
     :collect (gensym) :into binds
     :collect (gensym) :into updaters
     :finally (let ((desc (mapcar #'list binds updaters sequence-lengths)))
                (return `(with-packed-sequences (,@desc)
                           (with-reading-stream (,stream :block-size ,block-size)
                             (skip-buffer-to ">THREE" #\Newline)
                             (with-packed-caches-fill (,hash-access)
                               ,@desc)
                             (loop (with-current-char (char :skip-newline t)
                                     ,@(loop
                                          :for update :in updaters
                                          :for bind :in binds
                                          :for length :in sequence-lengths
                                          :collect `(,update char)
                                          :collect `(,hash-access ,length ,bind))))))))))

(defun seq= (seq-a seq-b)
  (declare (optimize (speed 3) (safety 0) (debug 0)) (type fixnum seq-a seq-b))
  (= seq-a seq-b))

(defun seq-hash (seq)
  (declare (optimize (speed 3) (safety 0) (debug 0)) (type fixnum seq))
  seq)

(sb-ext:define-hash-table-test seq= seq-hash)

(defmacro with-smart-dna-hash ((hash-access hash-loop &key (vector-threshold 1048576)) (&rest sequence-lengths) &body body)
  (loop :for length :in sequence-lengths
     :for bind = (gensym)
     :for area = (expt 4 length)
     :for vec-p = (<= area vector-threshold)
     :collect `(,bind ,(if vec-p
                           `(make-array ,area :element-type 'fixnum :initial-element 0)
                           `(make-hash-table :test ',(if (< area most-positive-fixnum) 'seq= 'eql)
                                             :rehash-size ,(expt 2 (1- length))
                                             :rehash-threshold 0.7))) :into binds
     :collect `(,length ,(if vec-p ``(elt ,',bind ,key) ``(the fixnum (gethash ,key ,',bind 0)))) :into accesses
     :collect `(,length ,(if vec-p
                             ``(loop :for i :from 0 :below ,',(expt 4 length)
                                  :for ,value = (elt ,',bind i)
                                  :for ,key = (unpack-sequence ,',length i)
                                  :unless (zerop ,value)
                                  ,@loop-keywords)
                             ``(loop :for packed-key :being :the :hash-keys :in ,',bind
                                  :for ,key = (unpack-sequence ,',length packed-key)
                                  :for ,value = (,',hash-access ,',length packed-key)
                                  ,@loop-keywords))) :into loops
     :finally (return `(let (,@binds)
                         (macrolet ((,hash-access (seq-length key) (ecase seq-length ,@accesses))
                                    (,hash-loop ((seq-length key value) &rest loop-keywords) (ecase seq-length ,@loops)))
                           ,@body)))))

(defmacro with-percentage ((hash-loop &rest seq-descriptions) &body body)
  (if (null seq-descriptions)
      `(progn ,@body)
      (destructuring-bind (seq-bind seq-length)
          (car seq-descriptions)
        `(let ((,seq-bind (,hash-loop (,seq-length k v)
                                      :summing v :into total :of-type fixnum
                                      :and :collect k :into seqs
                                      :and :collect v :into counts
                                      :finally (return (mapcar #'list
                                                               seqs
                                                               (mapcar (lambda (count)
                                                                         (declare (type fixnum count))
                                                                         (/ (* count 100.0) total))
                                                                       counts))))))
           (with-percentage (,hash-loop ,@(cdr seq-descriptions)) ,@body)))))

(defmacro obtain-seq-count (hash-access seq)
  `(list (,hash-access ,(length seq) (pack-sequence ,seq)) #\Tab ,seq))

(defun perform-work (stream)
  (declare (optimize (speed 3) (safety 0) (debug 0)))
  (with-smart-dna-hash (hash-access hash-loop :vector-threshold 16777216)
      (1 2 3 4 6 12 18)
    (macrolet ((incf-hash-element (seq-length key)
                 `(incf (hash-access ,seq-length ,key))))
      (with-dna-analyzed (stream incf-hash-element :block-size 655350) 1 2 3 4 6 12 18)
      (with-percentage (hash-loop (seqs-1 1) (seqs-2 2))
        (values (list seqs-1 seqs-2)
                (list (obtain-seq-count hash-access "GGT")
                      (obtain-seq-count hash-access "GGTA")
                      (obtain-seq-count hash-access "GGTATT")
                      (obtain-seq-count hash-access "GGTATTTTAATT")
                      (obtain-seq-count hash-access "GGTATTTTAATTTATAGT")))))))

(defun print-results (seq-freqs seq-counts)
  (labels ((compare (a b)
             (cond ((> (second a) (second b)) t)
                   ((< (second a) (second b)) nil)
                   (t (string< (first a) (first b)))))
           (print-freq (freq)
             (format t "~{~{~a ~3$~}~%~}~%" (sort freq #'compare))))
    (mapc #'print-freq seq-freqs)
    (format t "~{~{~a~c~a~}~%~}" seq-counts)))


(defun main ()
  (with-open-file (input-s #p"/dev/stdin" :external-format :iso-8859-1)
    (multiple-value-bind (freqs counts)
        (perform-work input-s)
      (print-results freqs counts))))


(in-package :cl-user)

(defun main ()
  (k-nucleotide::main))

 make, command-line, and program output logs

Sat, 04 May 2013 01:15:44 GMT

MAKE:
cp: ‘knucleotide.sbcl-5.sbcl’ and ‘./knucleotide.sbcl-5.sbcl’ are the same file
SBCL built with: /usr/local/bin/sbcl --userinit /dev/null --batch --eval '(load "knucleotide.sbcl-5.sbcl_compile")'
### START knucleotide.sbcl-5.sbcl_compile
(handler-bind ((sb-ext:defconstant-uneql      (lambda (c) (abort c))))      (load (compile-file "knucleotide.sbcl-5.sbcl" ))) (save-lisp-and-die "sbcl.core" :purify t)
### END knucleotide.sbcl-5.sbcl_compile


; compiling file "/home/dunham/benchmarksgame/bench/knucleotide/knucleotide.sbcl-5.sbcl" (written 23 JAN 2013 08:18:18 PM):
; compiling (DEFPACKAGE #:K-NUCLEOTIDE ...)
; compiling (IN-PACKAGE :K-NUCLEOTIDE)
; compiling (DECLAIM (OPTIMIZE # ...))
; compiling (DEFMACRO WITH-PACKED-SEQUENCES ...)
; file: /home/dunham/benchmarksgame/bench/knucleotide/knucleotide.sbcl-5.sbcl
; in: DEFMACRO WITH-PACKED-SEQUENCES
;     (1- (EXPT 4 LENGTH))
; ==>
;   (- (EXPT 4 LENGTH) 1)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a FLOAT.

;     (1- LENGTH)
; ==>
;   (- LENGTH 1)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a FLOAT.

;     (* (1- LENGTH) 2)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a FLOAT.
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a SINGLE-FLOAT.
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a DOUBLE-FLOAT.
; 
; note: unable to
;   convert x*2^k to shift
; due to type uncertainty:
;   The first argument is a NUMBER, not a INTEGER.
; 
; note: unable to
;   recode as leas, shifts and adds
; due to type uncertainty:
;   The first argument is a NUMBER, not a (UNSIGNED-BYTE 64).
;   The result is a (VALUES NUMBER &OPTIONAL), not a (VALUES (UNSIGNED-BYTE 64)
;                                                            &REST T).
; 
; note: unable to
;   recode as leas, shifts and adds
; due to type uncertainty:
;   The first argument is a NUMBER, not a FIXNUM.
;   The result is a (VALUES NUMBER &OPTIONAL), not a (VALUES FIXNUM &REST T).

;     (1- (* (1- LENGTH) 2))
; ==>
;   (- (* (1- LENGTH) 2) 1)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a FLOAT.

;     (1- (EXPT 4 LENGTH))
; ==>
;   (- (EXPT 4 LENGTH) 1)
; 
; note: forced to do GENERIC-- (cost 10)
;       unable to do inline fixnum arithmetic (cost 1) because:
;       The first argument is a NUMBER, not a FIXNUM.
;       The result is a (VALUES NUMBER &OPTIONAL), not a (VALUES FIXNUM &REST T).
;       unable to do inline fixnum arithmetic (cost 2) because:
;       The first argument is a NUMBER, not a FIXNUM.
;       The result is a (VALUES NUMBER &OPTIONAL), not a (VALUES FIXNUM &REST T).
;       etc.

;     (1- LENGTH)
; ==>
;   (- LENGTH 1)
; 
; note: forced to do GENERIC-- (cost 10)
;       unable to do inline fixnum arithmetic (cost 1) because:
;       The first argument is a NUMBER, not a FIXNUM.
;       The result is a (VALUES NUMBER &OPTIONAL), not a (VALUES FIXNUM &REST T).
;       unable to do inline fixnum arithmetic (cost 2) because:
;       The first argument is a NUMBER, not a FIXNUM.
;       The result is a (VALUES NUMBER &OPTIONAL), not a (VALUES FIXNUM &REST T).
;       etc.

;     (* (1- LENGTH) 2)
; 
; note: forced to do GENERIC-* (cost 30)
;       unable to do inline fixnum arithmetic (cost 3) because:
;       The first argument is a NUMBER, not a FIXNUM.
;       The result is a (VALUES NUMBER &OPTIONAL), not a (VALUES FIXNUM &REST T).
;       unable to do inline (signed-byte 64) arithmetic (cost 4) because:
;       The first argument is a NUMBER, not a (SIGNED-BYTE 64).
;       The result is a (VALUES NUMBER &OPTIONAL), not a (VALUES (SIGNED-BYTE 64)
;                                                                &REST T).
;       etc.

;     (1- (* (1- LENGTH) 2))
; ==>
;   (- (* (1- LENGTH) 2) 1)
; 
; note: forced to do GENERIC-- (cost 10)
;       unable to do inline fixnum arithmetic (cost 1) because:
;       The first argument is a NUMBER, not a FIXNUM.
;       The result is a (VALUES NUMBER &OPTIONAL), not a (VALUES FIXNUM &REST T).
;       unable to do inline fixnum arithmetic (cost 2) because:
;       The first argument is a NUMBER, not a FIXNUM.
;       The result is a (VALUES NUMBER &OPTIONAL), not a (VALUES FIXNUM &REST T).
;       etc.

; compiling (DEFMACRO PACK-SEQUENCE ...)
; file: /home/dunham/benchmarksgame/bench/knucleotide/knucleotide.sbcl-5.sbcl
; in: DEFMACRO PACK-SEQUENCE
;     (LENGTH SEQUENCE)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a (SIMPLE-ARRAY * (*)).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a VECTOR.

; compiling (DEFUN UNPACK-SEQUENCE ...)
; compiling (DEFMACRO WITH-PACKED-CACHES-FILL ...)
; file: /home/dunham/benchmarksgame/bench/knucleotide/knucleotide.sbcl-5.sbcl
; in: DEFMACRO WITH-PACKED-CACHES-FILL
;     (>= K-NUCLEOTIDE::TICK LENGTH)
; --> OR LET IF OR THE = IF 
; ==>
;   (= SB-C::X SB-C::Y)
; 
; note: unable to open code because: The operands might not be the same type.

;     (LOOP :FOR K-NUCLEOTIDE::TICK :FROM 1 :TO (APPLY #'MAX
;                                                      (MAPCAR #'THIRD
;                                                              K-NUCLEOTIDE::UPDATERS))
;           :COLLECT `(K-NUCLEOTIDE::WITH-CURRENT-CHAR (CHAR :SKIP-NEWLINE T)
;                      ,@(LOOP :FOR (K-NUCLEOTIDE::BIND K-NUCLEOTIDE::UPDATE
;                                    LENGTH) :IN K-NUCLEOTIDE::UPDATERS
;                              :COLLECT `(,K-NUCLEOTIDE::UPDATE CHAR)
;                              :WHEN (>= K-NUCLEOTIDE::TICK LENGTH)
;                              :COLLECT `(,K-NUCLEOTIDE::HASH-ACCESS ,LENGTH
;                                         ,K-NUCLEOTIDE::BIND))))
; --> BLOCK LET SB-LOOP::WITH-LOOP-LIST-COLLECTION-HEAD LET* SB-LOOP::LOOP-BODY 
; --> TAGBODY WHEN IF 
; ==>
;   (> K-NUCLEOTIDE::TICK #:LOOP-LIMIT-59)
; 
; note: forced to do GENERIC-> (cost 10)
;       unable to do inline fixnum comparison (cost 4) because:
;       The first argument is a (INTEGER 1), not a FIXNUM.
;       The second argument is a REAL, not a FIXNUM.

; --> BLOCK LET SB-LOOP::WITH-LOOP-LIST-COLLECTION-HEAD LET* SB-LOOP::LOOP-BODY 
; --> TAGBODY SB-LOOP::LOOP-REALLY-DESETQ SETQ THE 1+ 
; ==>
;   (+ K-NUCLEOTIDE::TICK 1)
; 
; note: forced to do GENERIC-+ (cost 10)
;       unable to do inline fixnum arithmetic (cost 1) because:
;       The first argument is a (INTEGER 1), not a FIXNUM.
;       The result is a (VALUES (INTEGER 2) &OPTIONAL), not a (VALUES FIXNUM
;                                                                     &REST T).
;       unable to do inline fixnum arithmetic (cost 2) because:
;       The first argument is a (INTEGER 1), not a FIXNUM.
;       The result is a (VALUES (INTEGER 2) &OPTIONAL), not a (VALUES FIXNUM
;                                                                     &REST T).
;       etc.

;     (>= K-NUCLEOTIDE::TICK LENGTH)
; --> OR LET > IF 
; ==>
;   (> SB-C::X SB-C::Y)
; 
; note: forced to do GENERIC-> (cost 10)
;       unable to do inline fixnum comparison (cost 4) because:
;       The first argument is a (INTEGER 1), not a FIXNUM.
;       The second argument is a REAL, not a FIXNUM.

; compiling (DEFMACRO WITH-READING-STREAM ...)
; compiling (DEFMACRO SKIP-BUFFER-TO ...)
; file: /home/dunham/benchmarksgame/bench/knucleotide/knucleotide.sbcl-5.sbcl
; in: DEFMACRO SKIP-BUFFER-TO
;     (LOOP :FOR CHAR :ACROSS (STRING K-NUCLEOTIDE::PATTERN)
;           :COLLECT `(K-NUCLEOTIDE::WITH-CURRENT-CHAR (CHAR) (CHAR= CHAR ,CHAR)))
; --> BLOCK LET SB-LOOP::WITH-LOOP-LIST-COLLECTION-HEAD LET* SB-LOOP::LOOP-BODY 
; --> TAGBODY SB-LOOP::LOOP-REALLY-DESETQ SETQ THE AREF 
; ==>
;   (SB-KERNEL:HAIRY-DATA-VECTOR-REF ARRAY SB-INT:INDEX)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a STRING, not a SIMPLE-STRING.
; 
; note: unable to
;   avoid runtime dispatch on array element type
; due to type uncertainty:
;   The first argument is a STRING, not a SIMPLE-ARRAY.

; compiling (DEFMACRO WITH-DNA-ANALYZED ...)
; compiling (DEFUN SEQ= ...)
; compiling (DEFUN SEQ-HASH ...)
; compiling (SB-EXT:DEFINE-HASH-TABLE-TEST SEQ= ...)
; compiling (DEFMACRO WITH-SMART-DNA-HASH ...)
; file: /home/dunham/benchmarksgame/bench/knucleotide/knucleotide.sbcl-5.sbcl
; in: DEFMACRO WITH-SMART-DNA-HASH
;     (< K-NUCLEOTIDE::AREA MOST-POSITIVE-FIXNUM)
; 
; note: unable to
;   open-code FLOAT to RATIONAL comparison
; due to type uncertainty:
;   The first argument is a REAL, not a FLOAT.

;     (1- LENGTH)
; ==>
;   (- LENGTH 1)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a FLOAT.

;     (<= K-NUCLEOTIDE::AREA K-NUCLEOTIDE::VECTOR-THRESHOLD)
; --> OR LET < IF 
; ==>
;   (< SB-C::X SB-C::Y)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a REAL, not a SINGLE-FLOAT.
;   The second argument is a REAL, not a DOUBLE-FLOAT.
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a REAL, not a DOUBLE-FLOAT.
;   The second argument is a REAL, not a SINGLE-FLOAT.
; 
; note: unable to
;   open-code FLOAT to RATIONAL comparison
; due to type uncertainty:
;   The first argument is a REAL, not a FLOAT.
;   The second argument is a REAL, not a RATIONAL.

; --> OR LET IF OR THE = IF 
; ==>
;   (= SB-C::X SB-C::Y)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a REAL, not a SINGLE-FLOAT.
;   The second argument is a REAL, not a DOUBLE-FLOAT.
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a REAL, not a DOUBLE-FLOAT.
;   The second argument is a REAL, not a SINGLE-FLOAT.
; 
; note: unable to
;   open-code FLOAT to RATIONAL comparison
; due to type uncertainty:
;   The first argument is a REAL, not a FLOAT.
;   The second argument is a REAL, not a RATIONAL.
; 
; note: unable to open code because: The operands might not be the same type.

; --> OR LET < IF 
; ==>
;   (< SB-C::X SB-C::Y)
; 
; note: forced to do GENERIC-< (cost 10)
;       unable to do inline float comparison (cost 3) because:
;       The first argument is a REAL, not a SINGLE-FLOAT.
;       The second argument is a REAL, not a SINGLE-FLOAT.
;       unable to do inline float comparison (cost 3) because:
;       The first argument is a REAL, not a DOUBLE-FLOAT.
;       The second argument is a REAL, not a DOUBLE-FLOAT.
;       etc.

; --> OR LET IF OR THE = IF 
; ==>
;   (= SB-C::X SB-C::Y)
; 
; note: forced to do GENERIC-= (cost 10)
;       unable to do inline float comparison (cost 3) because:
;       The first argument is a REAL, not a DOUBLE-FLOAT.
;       The second argument is a REAL, not a DOUBLE-FLOAT.
;       unable to do inline float comparison (cost 3) because:
;       The first argument is a REAL, not a SINGLE-FLOAT.
;       The second argument is a REAL, not a SINGLE-FLOAT.

;     (< K-NUCLEOTIDE::AREA MOST-POSITIVE-FIXNUM)
; 
; note: forced to do GENERIC-< (cost 10)
;       unable to do inline fixnum comparison (cost 3) because:
;       The first argument is a REAL, not a FIXNUM.
;       unable to do inline fixnum comparison (cost 4) because:
;       The first argument is a REAL, not a FIXNUM.
;       etc.

;     (1- LENGTH)
; ==>
;   (- LENGTH 1)
; 
; note: forced to do GENERIC-- (cost 10)
;       unable to do inline fixnum arithmetic (cost 1) because:
;       The first argument is a NUMBER, not a FIXNUM.
;       The result is a (VALUES NUMBER &OPTIONAL), not a (VALUES FIXNUM &REST T).
;       unable to do inline fixnum arithmetic (cost 2) because:
;       The first argument is a NUMBER, not a FIXNUM.
;       The result is a (VALUES NUMBER &OPTIONAL), not a (VALUES FIXNUM &REST T).
;       etc.

; compiling (DEFMACRO WITH-PERCENTAGE ...)
; compiling (DEFMACRO OBTAIN-SEQ-COUNT ...)
; file: /home/dunham/benchmarksgame/bench/knucleotide/knucleotide.sbcl-5.sbcl
; in: DEFMACRO OBTAIN-SEQ-COUNT
;     (LENGTH K-NUCLEOTIDE::SEQ)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a (SIMPLE-ARRAY * (*)).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a VECTOR.

; compiling (DEFUN PERFORM-WORK ...)
; compiling (DEFUN PRINT-RESULTS ...)
; file: /home/dunham/benchmarksgame/bench/knucleotide/knucleotide.sbcl-5.sbcl
; in: DEFUN PRINT-RESULTS
;     (> (SECOND K-NUCLEOTIDE::A) (SECOND K-NUCLEOTIDE::B))
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a REAL, not a SINGLE-FLOAT.
;   The second argument is a REAL, not a DOUBLE-FLOAT.
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a REAL, not a DOUBLE-FLOAT.
;   The second argument is a REAL, not a SINGLE-FLOAT.
; 
; note: unable to
;   open-code FLOAT to RATIONAL comparison
; due to type uncertainty:
;   The first argument is a REAL, not a FLOAT.
;   The second argument is a REAL, not a RATIONAL.

;     (< (SECOND K-NUCLEOTIDE::A) (SECOND K-NUCLEOTIDE::B))
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a REAL, not a SINGLE-FLOAT.
;   The second argument is a REAL, not a DOUBLE-FLOAT.
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a REAL, not a DOUBLE-FLOAT.
;   The second argument is a REAL, not a SINGLE-FLOAT.
; 
; note: unable to
;   open-code FLOAT to RATIONAL comparison
; due to type uncertainty:
;   The first argument is a REAL, not a FLOAT.
;   The second argument is a REAL, not a RATIONAL.

;     (STRING< (FIRST K-NUCLEOTIDE::A) (FIRST K-NUCLEOTIDE::B))
; ==>
;   (SB-KERNEL:STRING<* SB-C::STRING1 SB-C::STRING2 SB-C::START1 SB-C::END1
;                       SB-C::START2 SB-C::END2)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a (OR (VECTOR CHARACTER) (VECTOR NIL) BASE-STRING
;                               SYMBOL CHARACTER), not a SIMPLE-BASE-STRING.
;   The second argument is a (OR (VECTOR CHARACTER) (VECTOR NIL) BASE-STRING
;                                SYMBOL CHARACTER), not a SIMPLE-BASE-STRING.

;     (> (SECOND K-NUCLEOTIDE::A) (SECOND K-NUCLEOTIDE::B))
; 
; note: forced to do GENERIC-> (cost 10)
;       unable to do inline float comparison (cost 3) because:
;       The first argument is a REAL, not a SINGLE-FLOAT.
;       The second argument is a REAL, not a SINGLE-FLOAT.
;       unable to do inline float comparison (cost 3) because:
;       The first argument is a REAL, not a DOUBLE-FLOAT.
;       The second argument is a REAL, not a DOUBLE-FLOAT.
;       etc.

;     (< (SECOND K-NUCLEOTIDE::A) (SECOND K-NUCLEOTIDE::B))
; 
; note: forced to do GENERIC-< (cost 10)
;       unable to do inline float comparison (cost 3) because:
;       The first argument is a REAL, not a SINGLE-FLOAT.
;       The second argument is a REAL, not a SINGLE-FLOAT.
;       unable to do inline float comparison (cost 3) because:
;       The first argument is a REAL, not a DOUBLE-FLOAT.
;       The second argument is a REAL, not a DOUBLE-FLOAT.
;       etc.

; compiling (DEFUN MAIN ...)
; compiling (IN-PACKAGE :CL-USER)
; compiling (DEFUN MAIN ...); 
; compilation unit finished
;   printed 45 notes


; /home/dunham/benchmarksgame_onecore/knucleotide/tmp/knucleotide.sbcl-5.fasl written
; compilation finished in 0:00:00.577
[undoing binding stack and other enclosing state... done]
[saving current Lisp image into sbcl.core:
writing 5952 bytes from the read-only space at 0x0x20000000
writing 4064 bytes from the static space at 0x0x20100000
writing 43450368 bytes from the dynamic space at 0x0x1000000000
done]
### START knucleotide.sbcl-5.sbcl_run
(main) (quit)
### END knucleotide.sbcl-5.sbcl_run

0.94s to complete and log all make actions

COMMAND LINE:
/usr/local/bin/sbcl  --noinform --core sbcl.core --userinit /dev/null --load knucleotide.sbcl-5.sbcl_run 0 < knucleotide-input25000000.txt

PROGRAM OUTPUT:
A 30.295
T 30.151
C 19.800
G 19.754

AA 9.177
TA 9.132
AT 9.131
TT 9.091
CA 6.002
AC 6.001
AG 5.987
GA 5.984
CT 5.971
TC 5.971
GT 5.957
TG 5.956
CC 3.917
GC 3.911
CG 3.909
GG 3.902

1471758	GGT
446535	GGTA
47336	GGTATT
893	GGTATTTTAATT
893	GGTATTTTAATTTATAGT

Revised BSD license

  Home   Conclusions   License   Play