1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 20:00:19 +02:00
guile/benchmark-suite/benchmarks
Ludovic Courtès ff4d367275 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.
2012-05-07 00:32:01 +02:00
..
0-reference.bm Changes so that benchmark-guile runs successfully 2009-09-22 00:39:57 +01:00
arithmetic.bm avoid inexact iteration count in benchmarks 2012-04-23 21:46:06 +02: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 Improve port benchmark. 2012-03-07 21:58:07 +01:00
r6rs-arithmetic.bm avoid inexact iteration count in benchmarks 2012-04-23 21:46:06 +02:00
read.bm Optimize `scm_read_string'. 2012-05-07 00:32:01 +02:00
srfi-1.bm add map and for-each benchmarks 2011-05-08 17:38:10 +02:00
srfi-13.bm Increase benchmark iterations to improve precision in comparisons over time 2009-11-03 22:50:07 +00:00
strings.bm Benchmarks for string comparisons 2011-03-19 15:25:28 -07: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