|
On Feb 19, 2014, at 19:12 , René Rebe wrote:
For some magic reason tailing zeroes work here on Mac on Linux with my last patch, I will debug the buffers tomorrow to see why that is the case. However, a magic free version would be to pre fill the whole buffer with newlines, to guarantee detection of the end. However, this is only more efficient than the for loop using getc with a local buffer size smaller than the default BUFFERSIZE which is apparently 8192 on my Linux system and 1024 on Mac OS X. With a local buffer of just 80 chars I get some moderate ~10% slowdown on the bible test case. Given this IO function may not be the most performance critical code path in Lua, that may be acceptable. But your milage may vary; and so I get the feeling nobody will like it here in any case. René -- ExactCODE GmbH, Jaegerstr. 67, DE-10117 Berlin http://exactcode.com | http://exactscan.com | http://ocrkit.com | http://t2-project.org | http://rene.rebe.de |