Skip to content

Instantly share code, notes, and snippets.

@jkern
Created December 3, 2009 01:41
Show Gist options
  • Select an option

  • Save jkern/247821 to your computer and use it in GitHub Desktop.

Select an option

Save jkern/247821 to your computer and use it in GitHub Desktop.

Revisions

  1. jkern revised this gist Dec 3, 2009. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions gistfile1.lisp
    Original file line number Diff line number Diff line change
    @@ -7,8 +7,7 @@
    :if-exists :supersede
    :if-does-not-exist :create
    :element-type 'unsigned-byte)
    (loop for i from 1 to
    (* (expt 2 20) 100) ; 100MB
    (loop repeat (* (expt 2 20) 100) ;100MB
    do (write-byte 102 s))))

    (time (filer "temp-bytes"))
  2. @invalid-email-address Anonymous created this gist Dec 3, 2009.
    14 changes: 14 additions & 0 deletions gistfile1.lisp
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    ; 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 for i from 1 to
    (* (expt 2 20) 100) ; 100MB
    do (write-byte 102 s))))

    (time (filer "temp-bytes"))