Thank you for your response, here is my test result: /d/Downloads/mingw $ cat sprintf.cc
#include <stdio.h> #define MAX 500000 int main () { int i; for (i = 0; i < MAX; i++){ char x[100]; sprintf(x, "x%dx%dx", i, i<<2); } } /d/Downloads/mingw $ cat stdsprintf.cc #include <cstdio> using std::sprintf; #define MAX 500000 int main () { int i; for (i = 0; i < MAX; i++){ char x[100]; sprintf(x, "x%dx%dx", i, i<<2); } } /d/Downloads/mingw $ for i in `ls -d --color=never */bin`; > do echo $i; cd $i; > ./i686-w64-mingw32-g++ --version; > ./i686-w64-mingw32-g++ -o ../../sprintf.exe ../../sprintf.cc > ./i686-w64-mingw32-g++ -o ../../stdsprintf.exe ../../stdsprintf.cc > time ../../sprintf.exe; > time ../../stdsprintf.exe; > ./x86_64-w64-mingw32-g++ --version; > ./x86_64-w64-mingw32-g++ -o ../../sprintf64.exe ../../sprintf.cc > ./x86_64-w64-mingw32-g++ -o ../../stdsprintf64.exe ../../stdsprintf.cc > time ../../sprintf64.exe; > time ../../stdsprintf64.exe; > cd ../.. > rm *.exe > done mingw-w64-gcc-4.7.2-stable-r4/bin i686-w64-mingw32-g++.exe (GCC) 4.7.2 Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. real 0m0.632s user 0m0.046s sys 0m0.062s real 0m4.867s user 0m0.062s sys 0m0.046s x86_64-w64-mingw32-g++.exe (GCC) 4.7.2 Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. real 0m0.620s user 0m0.047s sys 0m0.031s real 0m8.482s user 0m0.046s sys 0m0.046s mingw-w64-gcc-4.7.3-stable-r6/bin i686-w64-mingw32-g++.exe (GCC) 4.7.3 Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. real 0m0.634s user 0m0.078s sys 0m0.031s real 0m4.901s user 0m0.031s sys 0m0.077s x86_64-w64-mingw32-g++.exe (GCC) 4.7.3 Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. real 0m0.555s user 0m0.062s sys 0m0.031s real 0m8.601s user 0m0.047s sys 0m0.062s On Tue, Jun 25, 2013 at 5:29 AM, Derek Buitenhuis <derek.buitenh...@gmail.com> wrote: > On 2013-06-24 5:08 PM, Ruben Van Boxem wrote: >> IMHO, this needs to be looked into and optimized. Could you test an old >> build that uses the v2.x runtime to see if that changes anything. >> Unfortunately, I wouldn't be able to point you to one of my builds that uses >> this. I guess GCC 4.7.2 or 4.7.1 releases might use the stable 2.0[7,8] >> release. > > http://files.1f0.de/mingw/mingw-w64-gcc-4.7.2-stable-r4.7z > > ^ Uses GCC 4.7.2 and MinGW-w64 v2.0.7 ^ > > http://files.1f0.de/mingw/mingw-w64-gcc-4.7.3-stable-r6.7z > > ^ Uses GCC 4.7.3 and MinGW-w64 v2.0.8 ^ > > - Derek > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Windows: > > Build for Windows Store. > > http://p.sf.net/sfu/windows-dev2dev > _______________________________________________ > Mingw-w64-public mailing list > Mingw-w64-public@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public