Hello, "Andy Wingo" <wi...@pobox.com> skribis:
> commit 79eb47ea47650ef42c545931726277a7118a0210 > Author: Andy Wingo <wi...@pobox.com> > Date: Fri Feb 24 23:05:02 2012 +0100 > > port i/o optimizations for iso-8859-1 > > * libguile/ports.h (scm_t_port_encoding_mode): > * libguile/ports.c (scm_c_make_port_with_encoding): > (scm_i_set_port_encoding_x): Add special treatment for latin1 > encoding. > (get_latin1_codepoint, get_codepoint): Add latin1 fast-path. > > * libguile/print.c (display_string_as_latin1): Add latin1 fastpath. The problems with fast paths is that they become less fast when there are many of them. How does this change influence ‘benchmark-suite/benchmarks/ports.bm’? Also, how important is it to treat Latin-1 specially? I can see that UTF-8 is important, because it’s ubiquitous and a Unicode encoding, but Latin-1... More importantly, there’s code duplication. > +/* Read an ISO-8859-1 codepoint (a byte) from PORT. On success, return > + *0 and set CODEPOINT to the codepoint that was read, fill BUF with > + *its UTF-8 representation, and set *LEN to the length in bytes. > + *Return `EILSEQ' on error. */ ESTARS Thanks, Ludo’.