From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13845 invoked by alias); 27 Jan 2007 13:53:38 -0000 Received: (qmail 13829 invoked by uid 9341); 27 Jan 2007 13:53:37 -0000 Date: Sat, 27 Jan 2007 13:53:00 -0000 Message-ID: <20070127135337.13827.qmail@sourceware.org> From: asl@sourceware.org To: ecos-cvs@ecos.sourceware.org Subject: ecos/packages/language/c/libc/stdio/current Ch ... Mailing-List: contact ecos-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: , Sender: ecos-cvs-owner@sourceware.org List-Subscribe: X-SW-Source: 2007/txt/msg00028.txt.bz2 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.