mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-08 22:50:27 +02:00
This makes `peek-char' 40x faster on a port whose encoding is faster on a UTF-8 port containing multi-byte codepoints. The `xml->sxml' procedure is 4x faster on a 2.7 MiB XML file. * libguile/ports.c (get_codepoint): New procedure, moved here from `scm_getc', with the additional BUF and LEN parameters. (scm_getc): Use it. (scm_peek_char): Use it instead of the `scm_getc'/`scm_ungetc' sequence. * test-suite/tests/ports.test ("string ports")["peek-char [latin-1]", "peek-char [utf-8]"]: New tests. * benchmark-suite/Makefile.am (SCM_BENCHMARKS): Add `benchmarks/ports.bm'. * benchmark-suite/benchmarks/ports.bm: New file. |
||
---|---|---|
.. | ||
0-reference.bm | ||
bytevectors.bm | ||
chars.bm | ||
continuations.bm | ||
if.bm | ||
logand.bm | ||
ports.bm | ||
read.bm | ||
srfi-1.bm | ||
srfi-13.bm | ||
structs.bm | ||
subr.bm | ||
uniform-vector-read.bm | ||
vectors.bm | ||
vlists.bm | ||
write.bm |