[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Hash Table Collisions (n.runs-SA-2011.004)
- From: Petite Abeille <petite.abeille@...>
- Date: Thu, 5 Jan 2012 00:28:58 +0100
On Jan 4, 2012, at 9:52 PM, Sam Roberts wrote:
> write a small lua program that parses a 2 MB string of key/value pairs into a hash table and takes many hours to do so
Sure thing.
Setup:
Generate two set of headers, one random, one not so.
The resulting two files are about 67MB in size, about a million entries each.
Then process both content with a run-of-the-mill header parser.
local aTime = os.clock()
ReadHeader( io.open( 'notsorandom.txt', 'rb' ) )
print( os.clock() - aTime )
And the results are:
random: 24.88277
notsorandom: 902.190881
So quite taxing altogether.
Attachment:
TestHeader.lua
Description: Binary data
- References:
- Re: Hash Table Collisions (n.runs-SA-2011.004), Mark Hamburg
- Re: Hash Table Collisions (n.runs-SA-2011.004), Vladimir Protasov
- Re: Hash Table Collisions (n.runs-SA-2011.004), Leo Razoumov
- Re: Hash Table Collisions (n.runs-SA-2011.004), Vladimir Protasov
- Re: Hash Table Collisions (n.runs-SA-2011.004), Miles Bader
- Re: Hash Table Collisions (n.runs-SA-2011.004), Ashwin Hirschi
- Re: Hash Table Collisions (n.runs-SA-2011.004), Miles Bader
- Re: Hash Table Collisions (n.runs-SA-2011.004), William Ahern
- Re: Hash Table Collisions (n.runs-SA-2011.004), William Ahern
- Re: Hash Table Collisions (n.runs-SA-2011.004), Gé Weijers
- Re: Hash Table Collisions (n.runs-SA-2011.004), William Ahern
- Re: Hash Table Collisions (n.runs-SA-2011.004), Sam Roberts