Skip to content

Commit

Permalink
Flush the right amount of data when in write-ascii-string-optimized.
Browse files Browse the repository at this point in the history
  • Loading branch information
stassats committed Mar 22, 2012
1 parent 21db675 commit 7234a08
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion benchmarks.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
(make-string (or object-size 10000)))

(defmethod create-test-object ((type (eql 'constant-string)) &key)
#.(coerce "AAAAAAAAAAAAAAAAdddddddddddddddddddddsssssssssssss" 'simple-base-string))
#.(coerce "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" 'simple-base-string))

(defun class-preallocation-test (storage)
(loop for class in (storage-data storage)
Expand Down
2 changes: 2 additions & 0 deletions io-sbcl.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@
(left-length (sb-ext:truly-the word (- length left))))
(declare (word left left-length))
(copy-mem string-sap (sb-sys:int-sap position) left)
(setf (output-stream-buffer-position stream)
(output-stream-buffer-end stream))
(flush-buffer stream)
(copy-mem (sb-sys:sap+ string-sap left)
(sb-sys:int-sap start) left-length)
Expand Down

0 comments on commit 7234a08

Please sign in to comment.