diff options
author | Ludovic Courtès <ludo@gnu.org> | 2012-05-07 00:32:01 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2012-05-07 00:32:01 +0200 |
commit | ff4d3672757fec3c8509e26bc60abf95f9e8f51a (patch) | |
tree | 48c928690b6d8e7b68cf0316c998b96de24c4d67 /libguile/gettext.c | |
parent | 5bbd632fc36b14f59d51e4ba2d8e189fd3cc0f76 (diff) | |
download | guile-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/gettext.c')
0 files changed, 0 insertions, 0 deletions