Nmap Security Scanner
*Intro
*Ref Guide
*Install Guide
*Download
*Changelog
*Book
*Docs
Security Lists
*Nmap Hackers
*Nmap Dev
*Bugtraq
*Full Disclosure
*Pen Test
*Basics
*More
Security Tools
*Pass crackers
*Sniffers
*Vuln Scanners
*Web scanners
*Wireless
*Exploitation
*Packet crafters
*More
Site News
Site Search:
Exploit World
Advertising
About/Contact
Credits
Sponsors:
edgeos



Dailydave: Re: A small fun Python puzzle

Re: A small fun Python puzzle

From: Jeremy Kelley <jeremy_at_austin.ibm.com>
Date: Tue, 1 Apr 2008 14:19:56 -0500

The proprietor said to send this to the list.

-j

Quoting Dave Aitel (dave_at_immunityinc.com):
|> -----BEGIN PGP SIGNED MESSAGE-----
|> Hash: SHA1
|>
|> Jeremy Kelley wrote:
|> | btw, you're using the StringIO module to correct the problem, right?
|> | I forgot to mention that yesterday.
|> |
|> | -j
|> |
|> Nah, we just read in 1024 bytes of the file at a time ... makes life a
lot
|> easier. :>
|>
|> - -dave
|
| I typed up an email saying how StringIO would be faster than multiple
| reads of a filehandle then decided to write a quick test. I was wrong.
|
| My tests actually show that on avg, multiple reads from a file handle
| (on my laptop only) are approximately 5-15% faster for file sizes up to
| 32000000 bytes. Then, they even out and StringIO becomes a little
| faster until the size of the file hits a certain size and my laptop ram
| fills up. At that point, StringIO is twice the time as reading from the
| file handle.
|
| So, in summary. I'm wrong about StringIO. Yay for learning!
|
| That's my .02. I'll let it die now. :)
|
| -j

-- 
Jeremy Kelley <jeremy_at_austin.ibm.com>               Sr. Threat Analyst
gpg  1024D/E0DF8B2D  4BC3 B8B5 5B42 CC8E B6A9 2E85 32D3 C51C E0DF 8B2D
That's the problem with science.  You've got a bunch of empiricists
trying to describe things of unimaginable wonder.      -Bill Watterson
_______________________________________________
Dailydave mailing list
Dailydave_at_lists.immunitysec.com
http://lists.immunitysec.com/mailman/listinfo/dailydave
Received on Apr 01 2008
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]