guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Guile-commits] GNU Guile branch, master, updated. v2.1.0-68-g79eb47


From: Ludovic Courtès
Subject: Re: [Guile-commits] GNU Guile branch, master, updated. v2.1.0-68-g79eb47e
Date: Sun, 26 Feb 2012 22:38:15 +0100
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.93 (gnu/linux)

Hello,

"Andy Wingo" <address@hidden> skribis:

> commit 79eb47ea47650ef42c545931726277a7118a0210
> Author: Andy Wingo <address@hidden>
> 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’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]