Skip to content

Instantly share code, notes, and snippets.

@jkern
Created December 3, 2009 01:41
Show Gist options
  • Save jkern/247821 to your computer and use it in GitHub Desktop.
Save jkern/247821 to your computer and use it in GitHub Desktop.
; Writing bytes to a file, and timing the execution
(defun filer (path)
(with-open-file (s path
:direction :output
:if-exists :supersede
:if-does-not-exist :create
:element-type 'unsigned-byte)
(loop repeat (* (expt 2 20) 100) ;100MB
do (write-byte 102 s))))
(time (filer "temp-bytes"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment