Path: csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: Roedy Green Newsgroups: comp.lang.java.programmer Subject: Re: byte stream vs char stream buffer Date: Sat, 10 May 2014 17:21:19 -0700 Organization: Canadian Mind Products Lines: 24 Message-ID: References: Reply-To: Roedy Green NNTP-Posting-Host: K2Qzzs3EAqXk5RLzfhxcSw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: ForteAgent/7.20.32.1218 X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.programmer:28428 On Sat, 10 May 2014 23:24:57 +0200, Robert Klemme wrote, quoted or indirectly quoted someone who said : >I don't think duplicate buffering will >make things better. It does. And allocating your space exactly 50:50 makes a noticeable difference. the plain Buffered reader was done like this: final BufferedReader ibr = new BufferedReader( new FileReader( sampleDataFile ), buffsize / 2 ); It got whatever the default buffering on the internal inputstream is. It is not as fast as specifying buffers for the internal inputstream, lego-style. -- Roedy Green Canadian Mind Products http://mindprod.com Culture is your operating system. ~ Terence McKenna (born: 1946-11-16 died: 2000-04-03 at age: 53)