Aaron Watters added the comment:
Facundo
1) the +1024 was an accelerator to jump up to over 1k at the first resize.
I think it's a good idea or at least doesn't hurt.
2) Here is an example program:
def test():
from marshal import dumps
from time import time
testString = "abc"*100000000
print "now testing"
now = time()
dump = dumps(testString)
elapsed = time()-now
print "elapsed", elapsed
if __name__=="__main__":
test()
Here are two runs: the first with the old marshal and the second with the
patched marshal. The second is
better than 2* faster than the first.
arw:/home/arw/test> ~/apache2/htdocs/pythonsrc/Python/python_old mtest1.py
now testing
elapsed 4.13367795944
arw:/home/arw/test> ~/apache2/htdocs/pythonsrc/Python/python mtest1.py
now testing
elapsed 1.7495341301
arw:/home/arw/test>
The example that inspired this research was very complicated and involved
millions of calls to dumps
which caused a number of anomalies (system calls went berzerk for some
reason, maybe paging).
-- Aaron Watters
On Jan 11, 2008 9:25 AM, Facundo Batista <[EMAIL PROTECTED]> wrote:
>
> Facundo Batista added the comment:
>
> Why not just double the size? The "doubling + 1024" address some
> specific issue? If so, it should be commented.
>
> Also, do you have an example of a marshal.dumps() that suffers from this
> issue?
>
> Thank you!
>
> ----------
> nosy: +facundobatista
>
> __________________________________
> Tracker <[EMAIL PROTECTED]>
> <http://bugs.python.org/issue1792>
> __________________________________
>
Added file: http://bugs.python.org/file9124/unnamed
__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1792>
__________________________________
Facundo<br><br>1) the +1024 was an accelerator to jump up to over 1k at the
first resize. I think it's a good idea or at least doesn't
hurt.<br><br>2) Here is an example program:<br><br>def
test():<br> from marshal import dumps
<br> from time import time<br> testString =
"abc"*100000000<br> print "now
testing"<br> now = time()<br> dump =
dumps(testString)<br> elapsed =
time()-now<br> print "elapsed", elapsed
<br><br>if __name__=="__main__":<br>
test()<br><br>Here are two runs: the first with the old marshal and the second
with the patched marshal. The second is <br>better than 2* faster than
the first.<br><br>arw:/home/arw/test>
~/apache2/htdocs/pythonsrc/Python/python_old
mtest1.py<br>now testing<br>elapsed 4.13367795944<br>arw:/home/arw/test>
~/apache2/htdocs/pythonsrc/Python/python mtest1.py<br>now testing<br>elapsed
1.7495341301<br>arw:/home/arw/test> <br><br>The example that inspired this
research was very complicated and involved millions of calls to dumps
<br>which caused a number of anomalies (system calls went berzerk for some
reason, maybe paging).<br><br> -- Aaron Watters<br><br><div
class="gmail_quote">On Jan 11, 2008 9:25 AM, Facundo Batista <<a
href="mailto:[EMAIL PROTECTED]">
[EMAIL PROTECTED]</a>> wrote:<br><blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex;
padding-left: 1ex;"><br>Facundo Batista added the comment:<br><br>Why not just
double the size? The "doubling + 1024" address some
<br>specific issue? If so, it should be commented.<br><br>Also, do you have an
example of a marshal.dumps() that suffers from this<br>issue?<br><br>Thank
you!<br><br>----------<br>nosy: +facundobatista<br><div><div></div>
<div class="Wj3C7c"><br>__________________________________<br>Tracker <<a
href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>><br><<a
href="http://bugs.python.org/issue1792"
target="_blank">http://bugs.python.org/issue1792
</a>><br>__________________________________<br></div></div></blockquote></div><br>
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com