sb-ext:octets-to-string is sufficiently slower than flexi-streams:octets-to-string.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Triaged
|
Medium
|
Unassigned |
Bug Description
There may be gold in thar hills...
(defparameter *sample-octets*
(coerce
(iter (for i from 1 to 1000000)
(collect (random 128)))
'(vector (unsigned-byte 8))))
(define-benchmark sbcl-octets-
(sb-ext:
(define-benchmark fs-octets-to-string
(flexi-
> (benchmark-
REAL-TIME-MS 2
USER-RUN-TIME-US 2000
SYSTEM-RUN-TIME-US 1000
GC-RUN-TIME-MS 0
PROCESSOR-CYCLES 5966766
BYTES-CONSED 400032
> (benchmark-
REAL-TIME-MS 10
USER-RUN-TIME-US 9998
SYSTEM-RUN-TIME-US 1000
GC-RUN-TIME-MS 0
PROCESSOR-CYCLES 25453260
BYTES-CONSED 2490944
Changed in sbcl: | |
importance: | Undecided → Medium |
status: | New → Triaged |
tags: | added: streams |
If you're converting to UTF-8 (the benchmark really ought to say...), this is partly because SBCL is much more strict about well-formedness checking (at least it was last time I looked) and partly because flexi-streams computes the output length, enabling easy pre-allocation of the output buffer.