Massive fprintf speed difference without “-std=c99”

后端 未结 4 1075
面向向阳花
面向向阳花 2020-12-15 20:03

I had been struggling for weeks with a poor-performing translator I had written. On the following simple bechmark

#include

int main()
{
    i         


        
4条回答
  •  佛祖请我去吃肉
    2020-12-15 20:30

    Since MinGW32 3.15, compliant printf functions are available to use instead of those found in Microsoft C runtime (CRT). The new printf functions are used when compiling in strict ANSI, POSIX and/or C99 modes.

    For more information see the mingw32 changelog

    You can use __msvcrt_fprintf() to use the fast (non compliant) function.

提交回复
热议问题