Summary
read-string, order of magnitude speedup
Metadata
- Id: e68ed4fe4fa9b5fcdd5f533b5e6d1e3e1971b9d0
- Trac id: 21
- Type: enhancement
- Reporter: zbigniew
- Owner: felix
- Cc: felix
- Status: closed
- Component: core libraries
- Estimated difficulty:
- Resolution: fixed
- Priority: major
- Milestone:
- Version: 4.0.1
- Changetime: 2009-04-29 16:21:02 UTC
- Created: 2009-04-26 02:48:47 UTC
- Keywords:
Attachments
- e68ed4fe4fa9b5fcdd5f533b5e6d1e3e1971b9d0/attachments/read-string2.diff.txt
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.
Changes and comments
[2009-04-26 02:51:47 UTC] zbigniew attached read-string2.diff.txt (description=read-string patch)
[2009-04-29 16:20:57 UTC] felix wrote:
Patch is applied, see r14507.