Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #28435
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Robert Klemme <shortcutter@googlemail.com> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: byte stream vs char stream buffer |
| Date | Sun, 11 May 2014 16:02:40 +0200 |
| Lines | 40 |
| Message-ID | <bt9e82Fll8eU1@mid.individual.net> (permalink) |
| References | <vhljm9llt6jau94jqr573ccpjcnhkunsil@4ax.com> <slrnlmn1n7.bi9.avl@login.logic.tuwien.ac.at> <mr0qm9hbbeqj0rggqco3umj91bqvjeti58@4ax.com> <en0tm9pu331ts50galimgbk8bkseu83mtk@4ax.com> <bt7jpaFa8d5U1@mid.individual.net> <pqbtm9h82nb1q0qbdf87bae2h1jeot5uno@4ax.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | individual.net ptg3qx5rZGlOufVSpXvyJQO6K4HfLWLqPcE5F1Y5DvLspOoKg= |
| Cancel-Lock | sha1:i6N8lsaNKDchyTPoAXOeR1l+d3Y= |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
| In-Reply-To | <pqbtm9h82nb1q0qbdf87bae2h1jeot5uno@4ax.com> |
| Xref | csiph.com comp.lang.java.programmer:28435 |
Show key headers only | View raw
On 11.05.2014 01:08, Roedy Green wrote: > On Sat, 10 May 2014 23:24:57 +0200, Robert Klemme > <shortcutter@googlemail.com> wrote, quoted or indirectly quoted > someone who said : > >> I find this a fairly unspecific description of the test you did. We do >> not know what your test did to ensure file system caching or GC effects >> did not influence the measurement etc. > > the code is posted at > http://mindprod.com/applet/fileio.html#BUFFERSIZE I followed a slightly different approach and modularized my test a bit more. You can find it here: https://gist.github.com/rklemme/fad399b5e7cc4d3b6d0c File opening and closing is not measured. You can assume the data to purely come from memory (vastly more mem than file size + no disk activity shown). This was on an Xbuntu 14.04 64 bit, kernel version 3.13.0-24. No special JVM command line switches were used. > These are not particularly subtle effects. I ran five trials and took > the best time for each. I figured this would eliminate hotspot > initialisation and GC effects. Sounds good. I followed the same approach (i.e. repeating and using the min time value). My results: - The higher level the buffering, the more effective. - Buffering on byte level often actually rather hurts than helps. - Reading in 1k chunks from the application level is already close to optimal. Kind regards robert
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
byte stream vs char stream buffer Roedy Green <see_website@mindprod.com.invalid> - 2014-05-06 23:48 -0700
Re: byte stream vs char stream buffer Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2014-05-08 13:30 +0000
Re: byte stream vs char stream buffer Roedy Green <see_website@mindprod.com.invalid> - 2014-05-09 09:34 -0700
Re: byte stream vs char stream buffer Roedy Green <see_website@mindprod.com.invalid> - 2014-05-10 13:18 -0700
Re: byte stream vs char stream buffer Robert Klemme <shortcutter@googlemail.com> - 2014-05-10 23:24 +0200
Re: byte stream vs char stream buffer Roedy Green <see_website@mindprod.com.invalid> - 2014-05-10 16:08 -0700
Re: byte stream vs char stream buffer Robert Klemme <shortcutter@googlemail.com> - 2014-05-11 16:02 +0200
Re: byte stream vs char stream buffer markspace <markspace@nospam.nospam> - 2014-05-11 11:50 -0700
Re: byte stream vs char stream buffer markspace <markspace@nospam.nospam> - 2014-05-11 12:10 -0700
Re: byte stream vs char stream buffer Robert Klemme <shortcutter@googlemail.com> - 2014-05-11 21:34 +0200
Re: byte stream vs char stream buffer markspace <markspace@nospam.nospam> - 2014-05-11 12:55 -0700
Re: byte stream vs char stream buffer Roedy Green <see_website@mindprod.com.invalid> - 2014-05-16 16:55 -0700
Re: byte stream vs char stream buffer markspace <markspace@nospam.nospam> - 2014-05-16 17:36 -0700
Re: byte stream vs char stream buffer Roedy Green <see_website@mindprod.com.invalid> - 2014-05-16 19:52 -0700
Re: byte stream vs char stream buffer Roedy Green <see_website@mindprod.com.invalid> - 2014-05-16 16:37 -0700
Re: byte stream vs char stream buffer Roedy Green <see_website@mindprod.com.invalid> - 2014-05-10 17:21 -0700
Re: byte stream vs char stream buffer Martin Gregorie <martin@address-in-sig.invalid> - 2014-05-11 09:05 +0000
Re: byte stream vs char stream buffer Roedy Green <see_website@mindprod.com.invalid> - 2014-05-12 02:07 -0700
Re: byte stream vs char stream buffer Silvio <silvio@internet.com> - 2014-05-12 12:20 +0200
Re: byte stream vs char stream buffer Roedy Green <see_website@mindprod.com.invalid> - 2014-05-16 20:19 -0700
Re: byte stream vs char stream buffer Roedy Green <see_website@mindprod.com.invalid> - 2014-05-18 05:28 -0700
Re: byte stream vs char stream buffer Silvio <silvio@internet.com> - 2014-05-18 23:54 +0200
csiph-web