Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^6: Fast parsing for cypher block chaining

by fluffyvoidwarrior (Monk)
on Mar 01, 2006 at 17:20 UTC ( #533703=note: print w/ replies, xml ) Need Help??


in reply to Re^5: Fast parsing for cypher block chaining
in thread Fast parsing for cypher block chaining

Yes, Thanks.
I'll compare this with using Crypt::CBC as you suggested earlier.
As for the "bug" you spotted - my intention was to parse the last 64k buffer outside this loop which removes the need for huge numbers of loop exit condition tests ("while" actually does slow it down), replacing such tests with a simple counter in all except the last bufferfull.
I suppose I should have posted more code to give a better feel of things but I didn't want to dump too much on people when I thought I'd isolated the crux of the speed issue. That being how to optimise splitting a 64k string into 8 byte chunks. Using Crypt::CBC as you suggested may mean that I don't need to do this anyway.
Again, thanks for your help. I'll experiment further and update this post if your still interested .....


Comment on Re^6: Fast parsing for cypher block chaining
Re^7: Fast parsing for cypher block chaining
by ikegami (Pope) on Mar 01, 2006 at 18:21 UTC

    while is 19% faster! Well, for small files. For big files, it's probably the same speed, but more readable.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2014-12-25 13:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (160 votes), past polls