This is the mail archive of the
ecos-cvs@sourceware.org
mailing list for the ecos project.
ecos/packages/language/c/libc/stdio/current Ch ...
- From: asl at sourceware dot org
- To: ecos-cvs at ecos dot sourceware dot org
- Date: 27 Jan 2007 13:53:37 -0000
- Subject: ecos/packages/language/c/libc/stdio/current Ch ...
CVSROOT: /cvs/ecos
Module name: ecos
Changes by: asl@sourceware.org 2007-01-27 13:53:37
Modified files:
packages/language/c/libc/stdio/current: ChangeLog
packages/language/c/libc/stdio/current/include: stream.hxx
packages/language/c/libc/stdio/current/src/common: stream.cxx
vsnprintf.cxx
packages/language/c/libc/stdio/current/src/output: vfnprintf.cxx
Log message:
Speed-up [v]s[n]printf() functions by a factor of about 2+. In
particular, sprintf(s, "%s", "") becomes faster 2.8 times,
printing of every character -- 1.7 times, and, as a result, e.g.,
printing of a string of length 50 -- 2.2 times.
* include/stream.hxx (class Cyg_OutputStream): New ABC.
(class Cyg_StdioStream): inherit from Cyg_OutputStream; make
the destructor, write(), and get_error() virtual.
* src/output/vfnprintf.cxx (vfnprintf): Use ABC Cyg_OutputStream
instead of Cyg_StdioStream.
* src/common/vsnprintf.cxx (class Cyg_VsnprintfStream): New class
that specializes Cyg_OutputStream for output to a string.
(vsnprintf): Use Cyg_VsnprintfStream for printing to a string.