Opened 10 years ago

Closed 10 years ago

#21 closed enhancement (fixed)

read-string, order of magnitude speedup

Reported by: zbigniew Owned by: felix
Priority: major Milestone:
Component: core libraries Version: 4.0.1
Keywords: Cc: felix
Estimated difficulty:

Description

There was some old code that Kon added to speed up read-string on stream ports, but it was disabled (it did not work). The attached patch fixes and enables this code and also applies the speedup to unbounded reads. The result is almost exactly a 10x boost for read-string on stream ports.

Detailed benchmarks at http://paste.lisp.org/display/79185.

The patch also enables port-position updating for read-string. It only updates the column number, but I think this is sufficient for what are typically binary reads; if you want lines, use read-lines.

Attachments (1)

read-string2.diff.txt (3.7 KB) - added by zbigniew 10 years ago.
read-string patch

Download all attachments as: .zip

Change History (3)

Changed 10 years ago by zbigniew

read-string patch

comment:1 Changed 10 years ago by felix

Patch is applied, see r14507.

comment:2 Changed 10 years ago by felix

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.