[issue1997] unicode and string compare should not cause an exception

2008-02-02 Thread Aaron Watters
Aaron Watters added the comment: Okay. I haven't looked but this should be well documented somewhere because I found it very surprising (it crashed a large run somewhere in the middle). In the case of strings versus unicode I think it is possible to hack around this by catching the except

[issue1997] unicode and string compare should not cause an exception

2008-02-01 Thread Aaron Watters
New submission from Aaron Watters: As I understand it comparisons between two objects should always work. I get this at the interpreter prompt: Python 2.6a0 (trunk, Jan 11 2008, 11:40:59) [GCC 3.4.6 20060404 (Red Hat 3.4.6-8)] on linux2 Type "help", "copyright", "

[issue1792] o(n*n) marshal.dumps performance for largish objects with patch

2008-01-11 Thread Aaron Watters
Aaron Watters added the comment: also: I just modified the code to do iterations using increasingly large data sizes and I see the kind of very unpleasant behaviour for the old implementation (max time varies wildly from min time) that I saw in my more complex program. The new implementation

[issue1792] o(n*n) marshal.dumps performance for largish objects with patch

2008-01-11 Thread Aaron Watters
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 testStr

[issue1792] o(n*n) marshal.dumps performance for largish objects with patch

2008-01-11 Thread Aaron Watters
New submission from Aaron Watters: Much to my surprise I found that one of my applications seemed to be running slow as a result of marshal.dumps. I think the culprit is the w_more(...) function, which grows the marshal buffer in 1k units. This means that a marshal of size 100k will have 100