阅读背景:

C ++ ifstream.getline()明显慢于Java的BufferedReader.readLine()?

来源:互联网 

I'm in the process of rewriting one of my Android applications to take advantage of the NDK and one of the first things it has to do every time is open a 1.5MB text file (approximately 150k lines) and put every line in a data structure. When I did this operation using Java's BufferedReader.readLine(), reading the file from the SD card takes ~2.5 seconds. Here's the code I used for this:I'm in the process of rewriting one of my Andro




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: