Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: The 10**21 Problem (Part 2)

by oiskuu (Friar)
on May 18, 2014 at 09:21 UTC ( #1086495=note: print w/ replies, xml ) Need Help??


in reply to Re: The 10**21 Problem (Part 2)
in thread The 10**21 Problem (Part 2)

$ perl -lwe '$/ = \128; ++$hist[tr/\0//c] while <>; print "$_: $hist[$ +_]" for 0..$#hist;' lookzpM.byte-* 0: 12003438 1: 148200 2: 147874 ... 42: 330481 43: 33028

This means you have plenty of room to pack the lines as: {N} ({i}{x})* {pad}.
Compute q8 = (i ^ m7) & 127; q9 = (x ^ HASH_LEN);

Average 15.984 elements per line. Lots of looping and branches can be avoided this way.

Update. One more thing occurs to me. Indeed, those files compress rather well: lzma packs them 1:2500!


Comment on Re^2: The 10**21 Problem (Part 2)
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1086495]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2015-07-05 22:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (68 votes), past polls