1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-08 22:50:27 +02:00
guile/benchmark-suite/benchmarks
Ludovic Courtès fd5eec2b6e Optimize `peek-char'.
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.
2010-09-15 18:38:57 +02:00
..
0-reference.bm Changes so that benchmark-guile runs successfully 2009-09-22 00:39:57 +01:00
bytevectors.bm rename (rnrs bytevector) to (rnrs bytevectors) 2010-06-01 13:26:11 +02:00
chars.bm Changes so that benchmark-guile runs successfully 2009-09-22 00:39:57 +01:00
continuations.bm Increase benchmark iterations to improve precision in comparisons over time 2009-11-03 22:50:07 +00:00
if.bm Changes so that benchmark-guile runs successfully 2009-09-22 00:39:57 +01:00
logand.bm Changes so that benchmark-guile runs successfully 2009-09-22 00:39:57 +01:00
ports.bm Optimize `peek-char'. 2010-09-15 18:38:57 +02:00
read.bm fix read.bm 2010-04-17 14:04:49 +02:00
srfi-1.bm SRFI-1: Rewrite drop-right!', drop-while', `reduce', etc. in Scheme. 2010-09-02 00:03:07 +02:00
srfi-13.bm Increase benchmark iterations to improve precision in comparisons over time 2009-11-03 22:50:07 +00:00
structs.bm Add struct & vector benchmarks. 2009-12-11 13:03:46 +01:00
subr.bm Change Guile license to LGPLv3+ 2009-06-17 00:22:09 +01:00
uniform-vector-read.bm Increase benchmark iterations to improve precision in comparisons over time 2009-11-03 22:50:07 +00:00
vectors.bm Add struct & vector benchmarks. 2009-12-11 13:03:46 +01:00
vlists.bm Add `(ice-9 vlist)'. 2010-02-03 00:02:14 +01:00
write.bm Fix copyright year and module name of `write.bm'. 2010-09-15 18:27:47 +02:00