1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00
Commit graph

23 commits

Author SHA1 Message Date
Daniel Llorens
bb7c7362c3 Replace uniform-vector-read benchmark with bytevector-io benchmark
* benchmark-suite/benchmarks/uniform-vector-read.bm:
  Remove; uniform-vector-read! and uniform-vector-write were deprecated
  in 2.0 and are have been removed in 2.1.
* benchmark-suite/benchmarks/bytevector-io.bm: New benchmark.
* benchmark-suite/Makefile.am: Run the new benchmark.
2017-10-31 13:23:17 +01:00
Ludovic Courtès
87a8b56f8c Add 'string-hash' benchmarks.
* benchmark-suite/benchmarks/hash.bm: New file.
* benchmark-suite/Makefile.am (SCM_BENCHMARKS): Add it.
2015-01-11 22:37:00 +01:00
Andy Wingo
d10f7b572c move (test-suite lib) to lower dir; cleans up uninstalled paths.
* check-guile.in:
* test-suite/Makefile.am:
* test-suite/test-suite/lib.scm:

* benchmark-guile.in:
* benchmark-suite/Makefile.am:
* benchmark-suite/benchmark-suite/lib.scm: Lower the lib modules in the
  source tree.  This lets us remove top_srcdir and top_builddir from the
  uninstalled paths.

* test-suite/tests/asm-to-bytecode.test:
* test-suite/tests/brainfuck.test:
* test-suite/tests/compiler.test:
* test-suite/tests/ftw.test:
* test-suite/tests/gc.test:
* test-suite/tests/match.test:
* test-suite/tests/rnrs-libraries.test:
* test-suite/tests/rnrs-test-a.scm:
* test-suite/tests/sxml.match.test: Adapt to not expect that module
  names be prefixed with "test-suite".
2012-04-23 21:46:06 +02:00
Andreas Rottmann
b7715701b4 Add a few benchmarks for R6RS fixnum arithmetic
* benchmark-suite/benchmarks/r6rs-arithmetic.bm: New file containing
  some benchmarks for R6RS fixnum operations.
* benchmark-suite/Makefile.am (SCM_BENCHMARKS): Add
  benchmarks/r6rs-arithmetic.
2011-04-04 23:19:55 +02:00
Andreas Rottmann
75847d5767 Fix syntax error in benchmark-suite/Makefile.am
* benchmark-suite/Makefile.am (SCM_BENCHMARKS): Correct position of
  a trailing backslash.
2011-03-20 00:51:27 +01:00
Michael Gran
d78de77f43 Benchmarks for string comparisons
* benchmark-suite/benchmarks/strings.bm: new file
* benchmark-suite/Makefile.am: add strings.bm
2011-03-19 15:25:28 -07:00
Ludovic Courtès
e78d4bf9a9 Optimize 1+' and 1-' on fixnums.
* libguile/vm-i-scheme.c (INUM_MAX, INUM_MIN): New macros.
  (add1, sub1): Add/subtract without untagging the operand.  This leads
  to a 44% run time improvement compared to the previous
  implementation.

* libguile/vm.c: Include <stdint.h>.

* test-suite/tests/numbers.test ("1+", "1-"): Add tests for
  MOST-POSITIVE-FIXNUM, resp. MOST-NEGATIVE-FIXNUM, for 32-bit and
  34-bit values thereof.

* benchmark-suite/benchmarks/arithmetic.bm: New file.

* benchmark-suite/Makefile.am (SCM_BENCHMARKS): Add it.
2010-10-13 01:31:19 +02:00
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
Ludovic Courtès
07f49ac786 Factorize and optimize `write' for strings and characters.
According to `write.bm', this makes `write' 2.6 times faster for strings.

* libguile/print.c (iprin1): Use `write_character' when
  `SCM_WRITINGP (pstate)' and `SCM_CHARP (exp)' or `scm_is_string (exp)'.
  (scm_i_charprint): Remove.
  (display_character, write_character): New functions.
  (scm_write_char): Use `display_character' instead of
  `scm_i_charprint'.

* libguile/print.h (scm_i_charprint): Remove declaration.

* benchmark-suite/benchmarks/write.bm: New file.

* benchmark-suite/Makefile.am (SCM_BENCHMARKS): Add
  `benchmarks/write.bm'.
2010-09-14 16:11:19 +02:00
Ludovic Courtès
0b7f2eb8bf Start rewriting SRFI-1 in Scheme.
This partially reverts commit e556f8c3c6
(Fri May 6 2005).

* module/srfi/srfi-1.scm (xcons, list-tabulate, not-pair?, car+cdr,
  last, fold, list-index): New procedures.

* srfi/srfi-1.c (srfi1_module): New variable.
  (CACHE_VAR): New macro.
  (scm_srfi1_car_plus_cdr, scm_srfi1_fold, scm_srfi1_last,
  scm_srfi1_list_index, scm_srfi1_list_tabulate, scm_srfi1_not_pair_p,
  scm_srfi1_xcons): Rewrite as proxies of the corresponding Scheme
  procedure.

* test-suite/tests/srfi-1.test ("list-tabulate")["-1"]: Change exception
  type to `exception:wrong-type-arg'.

* benchmark-suite/benchmarks/srfi-1.bm: New file.

* benchmark-suite/Makefile.am (SCM_BENCHMARKS): Add
  `benchmarks/srfi-1.bm'.

* test-suite/standalone/Makefile.am (test_srfi_1_SOURCES,
  test_srfi_1_CFLAGS, test_srfi_1_LDADD): New variables.
  (check_PROGRAMS): Add `test-srfi-1'.
  (TESTS): Ditto.

* test-suite/standalone/test-srfi-1.c: New file.
2010-07-21 01:07:56 +02:00
Ludovic Courtès
410f2f0ddc Add missing benchmark files to the distribution.
* benchmark-suite/Makefile.am (SCM_BENCHMARKS): Add
  `benchmarks/chars.bm' and `benchmarks/srfi-13.bm'.
2010-07-13 00:08:09 +02:00
Ludovic Courtès
22ec6a31ed Add `(ice-9 vlist)'.
* module/ice-9/vlist.scm, test-suite/tests/vlist.test,
  benchmark-suite/benchmarks/vlists.bm: New files.

* module/Makefile.am (ICE_9_SOURCES): Add `vlist.scm'.

* test-suite/Makefile.am (SCM_TESTS): Add `tests/vlist.test'.

* benchmark-suite/Makefile.am (SCM_BENCHMARKS): Add
  `benchmarks/vlists.bm'.

* doc/ref/api-compound.texi (VLists, VHashes): New nodes.
2010-02-03 00:02:14 +01:00
Ludovic Courtès
f680bdd762 Add struct & vector benchmarks.
* benchmark-suite/benchmarks/structs.bm,
  benchmark-suite/benchmarks/vectors.bm: New files.

* benchmark-suite/Makefile.am (SCM_BENCHMARKS): Add.

* benchmark-suite/benchmarks/bytevectors.bm: Fix copyright.
2009-12-11 13:03:46 +01:00
Ludovic Courtès
981ff600e8 Fix makefile indentation.
* benchmark-suite/Makefile.am, libguile/Makefile.am, meta/Makefile.am:
  Use TAB instead of 8 spaces...

* .x-sc_makefile_check: New file.
2009-11-24 23:41:08 +01:00
Ludovic Courtès
1ee2c72eaf Import R6RS bytevectors and I/O ports from Guile-R6RS-Libs 0.2.
* README: Document dependency on GNU libunistring.

* benchmark-suite/Makefile.am (SCM_BENCHMARKS): Add
  `benchmark/bytevectors.bm'.

* configure.in: Make sure we have libunistring; update $LIBS.

* libguile.h: Include "bytevectors.h" and "r6rs-ports.h".

* libguile/Makefile.am (libguile_la_SOURCES): Add `bytevectors.c' and
  `r6rs-ports.c'
  (DOT_X_FILES): Add `bytevectors.x' and `r6rs-ports.x'.
  (DOT_DOC_FILES): Add `bytevectors.doc' and `r6rs-ports.doc'.
  (noinst_HEADERS): Add `ieee-754.h'.
  (modinclude_HEADERS): Add `bytevectors.h' and `r6rs-ports.h'

* libguile/validate.h (SCM_VALIDATE_BYTEVECTOR): New macro.

* module/Makefile.am (SOURCES): Add $(RNRS_SOURCES).
  (RNRS_SOURCES): New variable.

* test-suite/Makefile.am (SCM_TESTS): Add `bytevectors.test' and
  `r6rs-ports.test'.
2009-05-28 23:12:01 +02:00
Ludovic Courtès
b786a5bbf8 Add subr invocation benchmark.
* benchmark-suite/Makefile.am (SCM_BENCHMARKS): Add `subr.bm'.
2009-03-02 00:18:34 +01:00
Ludovic Courtès
aa51e98ac5 Add `uniform-vector-read!' benchmark. 2008-09-15 01:35:04 +01:00
Ludovic Courtès
61db429e25 Add `ChangeLog-2008' files to the distribution. 2008-09-12 21:57:52 +02:00
Ludovic Courtès
6bb1dc98b9 Add `read' benchmark. 2008-04-17 10:24:10 +02:00
Marius Vollmer
7f9da94135 (SCM_BENCHMARKS_DIRS, dist-hook): Removed, they are
no longer needed and lead to unclean tarballs.
2006-05-01 21:32:21 +00:00
Marius Vollmer
1bb649f993 (dist-hook): Use quotes so that an empty SCM_BENCHMARKS_DIRS works. 2002-07-26 16:20:53 +00:00
Marius Vollmer
5a6aa7e7ce (SCM_BENCHMARKS): List the real benchmarks, not foo
and bar.
(SCM_BENCHMARKS_DIRS): Uncommented, with an empty value.
2002-07-26 16:00:27 +00:00
Dirk Herrmann
0237895653 * COPYING, README, Makefile.am, lib.scm, guile-benchmark: Copied
from the test-suite directory, renamed and adapted for use with
benchmarks.

* benchmarks/logand.bm, benchmarks/continuations.bm,
benchmarks/if.bm:  Added as initial fairly stupid examples for
benchmarks.
2002-07-20 01:21:36 +00:00