W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2010

Re: Hash functions

From: Glenn Maynard <glenn@zewt.org>
Date: Mon, 20 Dec 2010 21:49:36 -0500
Message-ID: <AANLkTik1F77JoVxOZZQP8SdpTwsJ7J06C7mJuqrx2vso@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: public-webapps@w3.org
On Mon, Dec 20, 2010 at 8:49 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> Or if I modify it to only calculate one hash, but have that be the hash of a
> 3,840,000 character string, I get times around 400ms.
>
> Running a command-line shasum utility on the same 3,840,000 characters (as
> ASCII in a file, etc) on the same hardware seems to be about 8x faster than
> that for me (50ms or so).

I see similar magnitudes comparing FF4b7 vs. sha1sum(1).

> So I guess the question is how much data we want to be pushing through the
> hash function and what throughput we expect, and whether we think JS engines
> simply won't get there or will take too long to do so.

Pushing gigabytes through it is plausible for most of these uses.
Even something as simple as a web-based sha1sum application would have
saved me and a user time recently while validating a large download.

-- 
Glenn Maynard
Received on Tuesday, 21 December 2010 02:50:04 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:42 GMT