- 25 May, 2006 38 kayıt (commit)
-
-
Bob Ippolito yazdı
-
Bob Ippolito yazdı
-
Brett Cannon yazdı
-
Georg Brandl yazdı
tp_compare to tp_richcompare ;)
-
Bob Ippolito yazdı
-
Bob Ippolito yazdı
-
Bob Ippolito yazdı
Use LONG_MIN and LONG_MAX to check Python integer bounds instead of the incorrect INT_MIN and INT_MAX
-
Fredrik Lundh yazdı
-
Georg Brandl yazdı
with PyObject_CallFunctionObjArgs, which is 30% faster.
-
Bob Ippolito yazdı
-
Bob Ippolito yazdı
-
Jack Diederich yazdı
-
Bob Ippolito yazdı
Struct now unpacks to PY_LONG_LONG directly when possible, also include #ifdef'ed out code that will return int instead of long when in bounds (not active since it's an API and doc change)
-
Fredrik Lundh yazdı
related tests are now about 10x faster.
-
Georg Brandl yazdı
-
Bob Ippolito yazdı
-
Andrew Dalke yazdı
new string is over max Py_ssize_t. I have no way to test it on my box or any box I have access to. At least it doesn't break anything.
-
Andrew M. Kuchling yazdı
-
Andrew Dalke yazdı
Now using PyInt_FromSsize_t.
-
Fredrik Lundh yazdı
for the related stringbench tests.
-
Andrew Dalke yazdı
made a copy of the string using PyString_FromStringAndSize(s, n) and modify the copied string in-place. However, 1 (and 0) character strings are shared from a cache. This cause "A".replace("A", "a") to change the cached version of "A" -- used by everyone. Now may the copy with NULL as the string and do the memcpy manually. I've added regression tests to check if this happens in the future. Perhaps there should be a PyString_Copy for this case?
-
Tim Peters yazdı
both mystrtoul.c and longobject.c. Share the table instead. Also cut its size by 64 entries (they had been used for an inscrutable trick originally, but the code no longer tries to use that trick).
-
Fredrik Lundh yazdı
now about 3x faster on my machine, for the replace tests from string- bench.
-
Fredrik Lundh yazdı
-
Kristján Valur Jónsson yazdı
-
Andrew M. Kuchling yazdı
-
Andrew Dalke yazdı
-
Andrew M. Kuchling yazdı
-
Fredrik Lundh yazdı
versions if they're not defined.
-
Kristján Valur Jónsson yazdı
Added a new macro, Py_IS_FINITE(X). On windows there is an intrinsic for this and it is more efficient than to use !Py_IS_INFINITE(X) && !Py_IS_NAN(X). No change on other platforms
-
Fredrik Lundh yazdı
strings too... (thanks to georg brandl for spotting the exact problem faster than anyone else)
-
Fredrik Lundh yazdı
(the unicode versions of these are still 2x faster on windows, though...) based on work by Andrew Dalke, with tweaks by yours truly.
-
Andrew M. Kuchling yazdı
-
Thomas Wouters yazdı
statement raise SyntaxError, and add testcase.
-
Thomas Wouters yazdı
-
Walter Dörwald yazdı
-
Fred Drake yazdı
(SF patch #1281291, contributed by Rory Yorke)
-
Andrew M. Kuchling yazdı
-
- 24 May, 2006 2 kayıt (commit)
-
-
Tim Peters yazdı
``long(str, base)`` is now up to 6x faster for non-power-of-2 bases. The largest speedup is for inputs with about 1000 decimal digits. Conversion from non-power-of-2 bases remains quadratic-time in the number of input digits (it was and remains linear-time for bases 2, 4, 8, 16 and 32). Speedups at various lengths for decimal inputs, comparing 2.4.3 with current trunk. Note that it's actually a bit slower for 1-digit strings: len speedup ---- ------- 1 -4.5% 2 4.6% 3 8.3% 4 12.7% 5 16.9% 6 28.6% 7 35.5% 8 44.3% 9 46.6% 10 55.3% 11 65.7% 12 77.7% 13 73.4% 14 75.3% 15 85.2% 16 103.0% 17 95.1% 18 112.8% 19 117.9% 20 128.3% 30 174.5% 40 209.3% 50 236.3% 60 254.3% 70 262.9% 80 295.8% 90 297.3% 100 324.5% 200 374.6% 300 403.1% 400 391.1% 500 388.7% 600 440.6% 700 468.7% 800 498.0% 900 507.2% 1000 501.2% 2000 450.2% 3000 463.2% 4000 452.5% 5000 440.6% 6000 439.6% 7000 424.8% 8000 418.1% 9000 417.7%
-
Tim Peters yazdı
be make to pass now for unicode if it passes for str, or vice versa.
-