Massive fprintf speed difference without “-std=c99”

后端 未结 4 1084
面向向阳花
面向向阳花 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:36

    Using -std=c99 disable all GNU extensions.

    With GNU extensions and optimization, your fprintf(test, "B") is probably replaced by a fputc('B', test)

    Note this answer is obsolete, see https://stackoverflow.com/a/13973562/611560 and https://stackoverflow.com/a/13973933/611560

提交回复
热议问题