Is std::ifstream significantly slower than FILE?

后端 未结 6 1829
余生分开走
余生分开走 2020-12-01 11:07

I\'ve been informed that my library is slower than it should be, on the order of 30+ times too slow parsing a particular file (text file, size 326 kb). The user suggested th

6条回答
  •  情话喂你
    2020-12-01 12:14

    All benchmarks are evil. Just profile your code for the data you expect.

    I performed an I/O performance comparison between Ruby, Python, Perl, C++ once. For my data, languages versions, etc C++'s variant was several times slower (it was a big suprise at that time).

提交回复
热议问题