summaryrefslogtreecommitdiff
path: root/libguile/print.h
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2010-09-14 16:10:52 +0200
committerLudovic Courtès <ludo@gnu.org>2010-09-14 16:11:19 +0200
commit07f49ac786e0f1c007eb336e2fb7a572e8405316 (patch)
treeab04b1efe4ee3062959b659456b3abc53b9d1b6f /libguile/print.h
parent4ff2b9f4b6fab00e0e982ce6d1b2594c19704d6e (diff)
downloadguile-07f49ac786e0f1c007eb336e2fb7a572e8405316.tar.gz
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'.
Diffstat (limited to 'libguile/print.h')
-rw-r--r--libguile/print.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/libguile/print.h b/libguile/print.h
index ae2aaef54..64d1f4bd8 100644
--- a/libguile/print.h
+++ b/libguile/print.h
@@ -3,7 +3,7 @@
#ifndef SCM_PRINT_H
#define SCM_PRINT_H
-/* Copyright (C) 1995,1996,1998,2000,2001, 2003, 2004, 2006, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1998,2000,2001, 2003, 2004, 2006, 2008, 2010 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -78,7 +78,6 @@ SCM_API SCM scm_print_options (SCM setting);
SCM_API SCM scm_make_print_state (void);
SCM_API void scm_free_print_state (SCM print_state);
SCM_INTERNAL SCM scm_i_port_with_print_state (SCM port, SCM print_state);
-SCM_INTERNAL void scm_i_charprint (scm_t_wchar c, SCM port);
SCM_API void scm_intprint (scm_t_intmax n, int radix, SCM port);
SCM_API void scm_uintprint (scm_t_uintmax n, int radix, SCM port);
SCM_API void scm_ipruk (char *hdr, SCM ptr, SCM port);