Commit Graph

70 Commits

Author SHA1 Message Date
Paolo Carlini cbf22cc549 container_benchmark.cc: Tweak outputs.
2003-12-17  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/performance/container_benchmark.cc: Tweak outputs.

	* testsuite/performance/list_create_fill_sort.cc: Shrink a
	bit some outputs.

	* testsuite/testsuite_performance.h: Widen a few output fields.

	* testsuite/performance/ifstream_extract_int.cc: New.

From-SVN: r74738
2003-12-17 10:16:03 +00:00
Paolo Carlini 93cbdb1a0c container_benchmark.cc: New...
2003-12-16  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/performance/container_benchmark.cc: New, a
	benchmark developed by Bjarne Stroustrup and Alexander
	Stepanov and made available with no restrictions.

	* testsuite/testsuite_performance.h (report_header): New,
	useful to produce header lines in the reports.

From-SVN: r74713
2003-12-16 22:44:19 +00:00
Paolo Carlini b1660ae9ea narrow_widen_char.cc: Tweak the number of iterations for each test.
2003-12-16  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/performance/narrow_widen_char.cc: Tweak the
	number of iterations for each test.
	* testsuite/performance/narrow_widen_wchar_t.cc: Add a
	missing clear_counters.

From-SVN: r74692
2003-12-16 13:25:23 +00:00
Paolo Carlini 9a1349b920 re PR libstdc++/11723 (ctype<wchar_t>::do_is(mask, wchar_t) is slow)
2003-12-16  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/11723
	* include/bits/locale_facets.h: Add _M_bit and _M_wmask,
	used to speed up the computation of ctype::do_is.
	* config/locale/generic/ctype_members.cc
	(_M_initialize_ctype): Fill _M_bit and _M_wmask.
	(ctype::do_is): Use _M_bit and _M_wmask.
	* config/locale/gnu/ctype_members.cc: Likewise.
	* testsuite/performance/is_wchar_t.cc: New.

	* testsuite/performance/narrow_widen_wchar_t.cc: Tweak
	string literal (incorrect citation ;)

	* include/bits/locale_facets.h: Minor tweaks, const
	correctness, unsigned -> size_t.

From-SVN: r74686
2003-12-16 11:00:52 +00:00
Jerry Quinn 3fc63c15b4 ctype_noninline.h, [...] (ctype): Initialize _M_narrow, _M_widen.
2003-12-15  Jerry Quinn  <jlquinn@optonline.net>

        * config/os/aix/ctype_noninline.h,
	config/os/bsd/freebsd/ctype_noninline.h,
	config/os/bsd/netbsd/ctype_noninline.h,
	config/os/djgpp/ctype_noninline.h,
	config/os/generic/ctype_noninline.h,
	config/os/gnu-linux/ctype_noninline.h,
	config/os/hpux/ctype_noninline.h,
	config/os/irix/irix5.2/ctype_noninline.h,
	config/os/irix/irix6.5/ctype_noninline.h,
	config/os/mingw32/ctype_noninline.h,
	config/os/newlib/ctype_noninline.h,
	config/os/qnx/qnx6.1/ctype_noninline.h,
	config/os/solaris/solaris2.5/ctype_noninline.h,
	config/os/solaris/solaris2.6/ctype_noninline.h,
	config/os/solaris/solaris2.7/ctype_noninline.h,
	config/os/vxworks/ctype_noninline.h,
	config/os/windiss/ctype_noninline.h (ctype):  Initialize
	_M_narrow, _M_widen.
	* include/bits/locale_facets.h (_M_widen, _M_widen_ok,
	_M_narrow, _M_narrow_ok): New.
	(widen, narrow): Use tables to bypass virtual functions.
	(_M_widen_init, _M_narrow_init): New.

From-SVN: r74662
2003-12-16 01:57:03 +00:00
Paolo Carlini ca13fb7f5d locale_facets.tcc (num_get::do_get(bool&)): Fail as soon as the begins of both truename and falsename stop to match...
2003-12-15  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.tcc (num_get::do_get(bool&)):
	Fail as soon as the begins of both truename and falsename
	stop to match; always leave __beg one position beyond the
	last char successfully matched.
	* testsuite/22_locale/num_get/get/char/8.cc: New.
	* testsuite/22_locale/num_get/get/wchar_t/8.cc: Likewise.

2003-12-15  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.h (_M_widen): Reserve space
	for all the possible widened chars.
	* config/locale/generic/ctype_members.cc (_M_initialize_ctype):
	Compute at construction time all the possible widened chars.
	(do_widen): Tweak, simplify.
	* config/locale/gnu/ctype_members.cc: Likewise.
	* testsuite/performance/narrow_widen_wchar_t.cc: Add tests
	for the array versions.

From-SVN: r74636
2003-12-15 16:56:42 +00:00
Paolo Carlini e3c0c0989b re PR libstdc++/13341 (ctype<wchar_t>::do_narrow(wchar_t, char) is slow)
2003-12-12  Paolo Carlini  <pcarlini@suse.de>
	    Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/13341
	* include/bits/locale_facets.h (ctype<wchar_t>): Declare
	_M_initialize_ctype() and _M_narrow_ok, _M_narrow and _M_widen.
	* src/ctype.cc (ctype<wchar_t>::ctype(size_t),
	ctype<wchar_t>::ctype(__c_locale, size_t)): Use
	_M_initialize_ctype to fill _M_narrow and _M_widen.
	(ctype_byname<wchar_t>::ctype_byname(const char*, size_t)):
	Likewise.
	* config/locale/generic/ctype_members.cc (do_narrow, do_widen)
	Use _M_narrow and _M_widen when possible, instead of calling
	wctob and btowc, respectively.
	(_M_initialize_ctype): Define, it fills at construction time
	_M_narrow and _M_widen.
	* config/locale/gnu/ctype_members.cc: Likewise.
	* testsuite/performance/narrow_widen_wchar_t.cc: New.

Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com>

From-SVN: r74580
2003-12-12 19:44:17 +00:00
Paolo Carlini 5af91f0690 codecvt_members.cc (codecvt::do_length): Rewrite, using both mbsnrtowcs and mbrtowc in a loop...
2003-11-25  Paolo Carlini  <pcarlini@suse.de>

	* config/locale/gnu/codecvt_members.cc (codecvt::do_length):
	Rewrite, using both mbsnrtowcs and mbrtowc in a loop: the
	former is very fast, but stops if encounters a NUL.
	(codecvt::do_out): Tweaks.
	(codecvt::do_in): Tweaks, improve the code dealing with errors.
	* testsuite/performance/wchar_t_length.cc: New.

From-SVN: r73934
2003-11-25 21:41:28 +00:00
Paolo Carlini 3c8797ae81 codecvt_members.cc (codecvt::do_in): Rewrite, using both mbsnrtowcs and mbrtowc in a loop...
2003-11-24  Paolo Carlini  <pcarlini@suse.de>

	* config/locale/gnu/codecvt_members.cc (codecvt::do_in):
	Rewrite, using both mbsnrtowcs and mbrtowc in a loop: the
	former is very fast, but stops if encounters a NUL.
	(codecvt::do_out): Tweak.
	* testsuite/performance/wchar_t_in.cc: New.

2003-11-24  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_facets.h
	(__numpunct_cache<>::_M_cache): Set _M_allocated at the beginning
	in order to avoid memory leaks; simplify a bit.

From-SVN: r73893
2003-11-24 21:13:38 +00:00
Paolo Carlini 0fd1870171 re PR libstdc++/11602 (codecvt<wchar_t, char, mbstate_t> is slow.)
2003-11-20  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/11602
	* config/locale/gnu/codecvt_members.cc (codecvt::do_out):
	Rewrite, using both wcsnrtombs and wcrtomb in a loop: the
	former is very fast, but stops if encounters a NUL.
	* testsuite/performance/wchar_t_out.cc: New, from the PR.

From-SVN: r73769
2003-11-20 19:24:03 +00:00
Benjamin Kosnik 11f10e6b1f locale_facets.tcc: Tweak to avoid warnings.
2003-09-23  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_facets.tcc: Tweak to avoid warnings.
	* testsuite/testsuite_hooks.h: Same.
	* testsuite/*/*.cc: Same.

From-SVN: r71693
2003-09-23 20:03:30 +00:00
Benjamin Kosnik aecf642c78 *: Change __gnu_cxx_test to __gnu_test.
2003-07-24  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/*: Change __gnu_cxx_test to __gnu_test.

From-SVN: r69761
2003-07-24 21:08:03 +00:00
Gawain Bolton e55dc371ca list_create_fill_sort.cc: New.
2003-07-08  Gawain Bolton  <gp.bolton@computer.org>

	* testsuite/performance/list_create_fill_sort.cc: New.

From-SVN: r69105
2003-07-08 21:33:18 +00:00
Phil Edwards ac3d7b4413 create_testsuite_files: New file.
2003-07-05  Phil Edwards  <pme@gcc.gnu.org>

	* scripts/create_testsuite_files:  New file.
	* testsuite/Makefile.am (all-local, check-performance):  Use it.
	* testsuite/lib/libstdc++-v3-dg.exp (v3-computer-tests):  Remove.
	* testsuite/Makefile.in:  Regenerated.

	* testsuite/performance/filebuf_sputc.cc:  Remove the temporary
	files at the end.
	* testsuite/performance/fstream_seek_write.cc:  Likewise.
	* testsuite/performance/ofstream_insert_float.cc:  Likewise.
	* testsuite/performance/ofstream_insert_int.cc:  Likewise.
	* testsuite/abi_check.cc (main):  Nicer spacing in usage output.

From-SVN: r68988
2003-07-06 03:14:37 +00:00
Paolo Carlini 10ef4e2e3f 2003-07-04 Paolo Carlini <pcarlini@unitus.it>
Revert the fix for libstdc++/11378.

From-SVN: r68922
2003-07-04 16:36:26 +00:00
Paolo Carlini ac2c48d70f re PR libstdc++/11378 (Unbuffered sputn is slow)
2003-07-04  Paolo Carlini  <pcarlini@unitus.it>

	PR libstdc++/11378
	* include/std/std_fstream.h (xsputn): In the unbuffered case,
	provided always_noconv(), issue directly _M_file.xsputn.
	* testsuite/performance/filebuf_unbuf_sputn.cc: New.

From-SVN: r68921
2003-07-04 16:15:15 +00:00
Nathan C. Myers 8370378a24 filebuf_copy.cc: New, testing char by char file copy.
2003-06-26  Nathan C. Myers  <ncm-nospam@cantrip.org>
	    Paolo Carlini  <pcarlini@unitus.it>

	* testsuite/performance/filebuf_copy.cc: New, testing char
	by char file copy.

Co-Authored-By: Paolo Carlini <pcarlini@unitus.it>

From-SVN: r68538
2003-06-26 16:38:40 +00:00
Benjamin Kosnik c89c30ddb2 libstdc++-assign.txt: Update address.
2003-06-23  Benjamin Kosnik  <bkoz@redhat.com>

	* docs/html/17_intro/libstdc++-assign.txt: Update address.

	* testsuite/performance/ifstream_getline.cc: Fix.

From-SVN: r68382
2003-06-23 20:31:31 +00:00
Benjamin Kosnik ce4f8c6b7b testsuite_performance.h (time_counter): New.
2003-06-18  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/testsuite_performance.h (time_counter): New.
	(resource_counter): New.
	(report_performance): New.
	(start_counters): New.
	(stop_counters): New.
	(clear_counters): New.
	* testsuite/performance/allocator.cc: Instrument.
	* testsuite/performance/cout_insert_int.cc: Same.
	* testsuite/performance/complex_norm.cc: Same.
	* testsuite/performance/filebuf_sputc.cc: New.
	* testsuite/performance/fstream_seek_write.cc: Same.
	* testsuite/performance/ifstream_getline.cc: Same.
	* testsuite/performance/map_create_fill.cc: Same.
	* testsuite/performance/ofstream_insert_float.cc: Same.
	* testsuite/performance/ofstream_insert_int.cc: Same.
	* testsuite/performance/string_append.cc: Convert.
	* scripts/check_performance: New.
	* testsuite/Makefile.am (check-performance): New.
	(CLEANFILES): Add.

From-SVN: r68175
2003-06-19 04:00:59 +00:00
Benjamin Kosnik ca5e1be83d README: Move to...
2003-05-20  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/README: Move to...
	* docs/html/test.html: ...here. Add documentation.
	* docs/html/install.html: Move testing bits out..
	* docs/html/documentation.html: Add separate testing link.
        * testsuite/performance: Add.
        * testsuite/performance/allocator.cc: New.
        * testsuite/performance/complex_norm.cc: New.
        * testsuite/performance/cout_insert_int.cc: New.
        * testsuite/performance/fstream_seek_write.cc: New.
        * testsuite/performance/ifstream_getline.cc: New.
        * testsuite/performance/map_create_fill.cc: New.
        * testsuite/performance/ofstream_insert_float.cc: New.
        * testsuite/performance/ofstream_insert_int.cc: New.
        * testsuite/performance/string_append.cc: New.
	* testsuite/lib/libstdc++-v3-dg.exp (v3-compute-tests): Filter
	performance tests.

From-SVN: r67040
2003-05-20 22:25:09 +00:00