Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #18632

greatly differing processing time between java and Linux while calculating hashes?

Path csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail
From qwertmonkey@syberianoutpost.ru
Newsgroups comp.lang.java.programmer
Subject greatly differing processing time between java and Linux while calculating hashes?
Date Mon, 10 Sep 2012 01:45:36 +0000 (UTC)
Organization Aioe.org NNTP Server
Lines 31
Message-ID <k2jgo0$ocg$1@speranza.aioe.org> (permalink)
NNTP-Posting-Host z9Rq+Ge+SLJPEkk9TGcnaw.user.speranza.aioe.org
X-Complaints-To abuse@aioe.org
X-Notice Filtered by postfilter v. 0.8.2
X-Newsreader NetComponents
Xref csiph.com comp.lang.java.programmer:18632

Show key headers only | View raw


> As far as I could extract from that code (which I find pretty badly
readable btw.) you are measuring digest calculation and IO.
~ 
 Well, if I understand you, you will have to read in the file you are 
checksumming anyway, right?
~ 
 I used FileInputStream's read(byte[]) method in a straight forward way,
which is, byte[], what you must feed a MessageDigest's update method. So,
what do you mean?
~ 
> What measures did you take to ensure there are no effects from OS buffering?
~ 
 What do you mean? What extra measure should I take to ensure there are no
effects from OS buffering?
~ 
> Also, why are you comparing apples (Java) and oranges (Linux) - at
> least in the subject?
~ 
 Because I am trying to extract sugar from them in the most efficient way
~ 
> Are you aware that the JVM has some startup time
> which can be significant when measuring run once applications? 
~ 
 Yes, and this is why I am just timing the method call and testing different
block sizes for the buffer ...
~ 
 Still guys (to me) a difference of more than 25% in processing time is 
significant and I don't think that what you consider to be my odd style to code
is causing it
~ 
 lbrtchx

Back to comp.lang.java.programmer | Previous | NextNext in thread | Find similar | Unroll thread


Thread

greatly differing processing time between java and Linux while calculating hashes? qwertmonkey@syberianoutpost.ru - 2012-09-10 01:45 +0000
  Re: greatly differing processing time between java and Linux while calculating hashes? Roedy Green <see_website@mindprod.com.invalid> - 2012-10-13 15:12 -0700

csiph-web