Skip to content

Instantly share code, notes, and snippets.

@RobBlackwell
Last active January 4, 2016 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RobBlackwell/8649897 to your computer and use it in GitHub Desktop.
Save RobBlackwell/8649897 to your computer and use it in GitHub Desktop.
Richoramas Benchmark in Common Lisp
(ql:quickload "puri")
(defun test()
(loop for i from 0 to 1000000
collecting (puri:parse-uri "http://www.foo.com")))
(time (progn (test) t))
;;; 32 bit SBCL
;; Evaluation took:
;; 7.467 seconds of real time
;; 7.468750 seconds of total run time (5.859375 user, 1.609375 system)
;; [ Run times consist of 1.123 seconds GC time, and 6.346 seconds non-GC time. ]
;; 100.03% CPU
;; 39 lambdas converted
;; 20,113,939,131 processor cycles
;; 352,692,624 bytes consed
;;; 64 bit Clozure Common Lisp
;; took 6,472,000 microseconds (6.472000 seconds) to run.
;; 1,119,102 microseconds (1.119102 seconds, 17.29%) of which was spent in GC.
;;
;; During that period, and with 4 available CPU cores,
;; 6,453,125 microseconds (6.453125 seconds) were spent in user mode
;; 15,625 microseconds (0.015625 seconds) were spent in system mode
;; 304,001,664 bytes of memory allocated.
;;; 32 bit Clozure Common Lisp
;; took 6,822 milliseconds (6.822 seconds) to run.
;; 1,589 milliseconds (1.589 seconds, 23.29%) of which was spent in GC.
;; During that period, and with 4 available CPU cores,
;; 6,797 milliseconds (6.797 seconds) were spent in user mode
;; 16 milliseconds (0.016 seconds) were spent in system mode
;; 184,000,944 bytes of memory allocated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment