summaryrefslogtreecommitdiff
path: root/libguile/gc.c
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-05-07 00:32:01 +0200
committerLudovic Courtès <ludo@gnu.org>2012-05-07 00:32:01 +0200
commitff4d3672757fec3c8509e26bc60abf95f9e8f51a (patch)
tree48c928690b6d8e7b68cf0316c998b96de24c4d67 /libguile/gc.c
parent5bbd632fc36b14f59d51e4ba2d8e189fd3cc0f76 (diff)
downloadguile-ff4d3672757fec3c8509e26bc60abf95f9e8f51a.tar.gz
Optimize `scm_read_string'.
According to the new benchmarks, this leads a 5% speed improvement when reading small strings, and a 27% improvement when reading large strings. * libguile/read.c (READER_STRING_BUFFER_SIZE): Change to 128; update comment to mention codepoints. (scm_read_string): Make `str' a list of strings, instead of a string. Store characters read in buffer `c_str'. Cons to STR when C_STR is full, and concatenate/reverse at the end. * benchmark-suite/benchmarks/read.bm (small, large): New variables. Set %DEFAULT-PORT-ENCODING to "UTF-8". ("read")["small strings", "large strings"]: New benchmarks.
Diffstat (limited to 'libguile/gc.c')
0 files changed, 0 insertions, 0 deletions