summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* needforspeed: use "fastsearch" for count. this results in a 3x speedupFredrik Lundh2006-05-251-1/+122
| | | | for the related stringbench tests.
* Fixed problem identified by Georg. The special-case in-place code for replaceAndrew Dalke2006-05-251-2/+5
| | | | | | | | | | | 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?
* A new table to help string->integer conversion was added yesterday toTim Peters2006-05-253-44/+16
| | | | | | 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).
* needforspeed: new replace implementation by Andrew Dalke. replace isFredrik Lundh2006-05-251-182/+605
| | | | | now about 3x faster on my machine, for the replace tests from string- bench.
* needforspeed: check for overflow in replace (from Andrew Dalke)Fredrik Lundh2006-05-253-15/+54
|
* Fix incorrect documentation for the Py_IS_FINITE(X) macro.Kristján Valur Jónsson2006-05-251-3/+3
|
* Fix another typoAndrew M. Kuchling2006-05-251-1/+1
|
* Added tests for implementation error we came up with in the need for speed ↵Andrew Dalke2006-05-251-0/+19
| | | | sprint.
* Fix comment typosAndrew M. Kuchling2006-05-251-1/+1
|
* needforspeed: _toupper/_tolower is a SUSv2 thing; fall back on ISO CFredrik Lundh2006-05-251-0/+9
| | | | versions if they're not defined.
* Added a new macro, Py_IS_FINITE(X). On windows there is an intrinsic for ↵Kristján Valur Jónsson2006-05-253-5/+12
| | | | this and it is more efficient than to use !Py_IS_INFINITE(X) && !Py_IS_NAN(X). No change on other platforms
* needforspeed: make new upper/lower work properly for single-characterFredrik Lundh2006-05-251-4/+8
| | | | | strings too... (thanks to georg brandl for spotting the exact problem faster than anyone else)
* needforspeed: speed up upper and lower for 8-bit string objects.Fredrik Lundh2006-05-251-22/+20
| | | | | | | (the unicode versions of these are still 2x faster on windows, though...) based on work by Andrew Dalke, with tweaks by yours truly.
* Add entry; and fix a typoAndrew M. Kuchling2006-05-251-1/+7
|
* Update graminit.c for the fix for #1488915, Multiple dots in relative importThomas Wouters2006-05-252-21/+25
| | | | statement raise SyntaxError, and add testcase.
* Fix #1488915, Multiple dots in relative import statement raise SyntaxError.Thomas Wouters2006-05-251-1/+1
|
* Replace tab inside comment with space.Walter Dörwald2006-05-251-1/+1
|
* fix broken links in PDFFred Drake2006-05-252-3/+22
| | | | (SF patch #1281291, contributed by Rory Yorke)
* Minor edits; add an itemAndrew M. Kuchling2006-05-251-2/+9
|
* Heavily fiddled variant of patch #1442927: PyLong_FromString optimization.Tim Peters2006-05-243-44/+237
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ``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%
* Disable the damn empty-string replace test -- it can'tTim Peters2006-05-241-2/+2
| | | | | be make to pass now for unicode if it passes for str, or vice versa.
* Whitespace normalization.Tim Peters2006-05-241-2/+2
|
* We can't leave the checked-in tests broken.Tim Peters2006-05-241-5/+10
|
* Added a slew of test for string replace, based various corner cases fromAndrew Dalke2006-05-241-0/+157
| | | | | | | | | | the Need For Speed sprint coding. Includes commented out overflow tests which will be uncommented once the code is fixed. This test will break the 8-bit string tests because "".replace("", "A") == "" when it should == "A" We have a fix for it, which should be added tomorrow.
* needforspeed: refactored the replace code slightly; special-caseFredrik Lundh2006-05-241-84/+86
| | | | constant-length changes; use fastsearch to locate the first match.
* refactor unpack, add unpack_fromBob Ippolito2006-05-243-62/+161
|
* needforspeedindeed: use fastsearch also for __contains__Fredrik Lundh2006-05-241-4/+19
|
* needforspeed: use "fastsearch" for count and findstring helpers. thisFredrik Lundh2006-05-241-1/+109
| | | | | | | | | | | | | | results in a 2.5x speedup on the stringbench count tests, and a 20x (!) speedup on the stringbench search/find/contains test, compared to 2.5a2. for more on the algorithm, see: http://effbot.org/zone/stringlib.htm if you get weird results, you can disable the new algoritm by undefining USE_FAST in Objects/unicodeobject.c. enjoy /F
* use Py_ssize_t for string indexes (thanks, neal!)Fredrik Lundh2006-05-241-2/+2
|
* Add missing svn:eol-style property to text files.Tim Peters2006-05-231-1013/+1013
|
* Whitespace normalization.Tim Peters2006-05-234-1020/+1019
|
* test_struct grew weird behavior under regrtest.py -R,Tim Peters2006-05-231-0/+2
| | | | | due to a module-level cache. Clearing the cache should make it stop showing up in refleak reports.
* return 0 on misses, not -1.Fredrik Lundh2006-05-231-1/+1
|
* Get the Windows build working again (recover fromTim Peters2006-05-232-5/+5
| | | | `struct` module changes).
* Add itemAndrew M. Kuchling2006-05-231-0/+5
|
* fix typo in _structBob Ippolito2006-05-231-2/+2
|
* forward declaration for PyStructTypeBob Ippolito2006-05-231-0/+1
|
* Add two itemsAndrew M. Kuchling2006-05-231-4/+8
|
* fix linking issue, warnings, in structBob Ippolito2006-05-231-4/+0
|
* patch #1493701: performance enhancements for struct moduleBob Ippolito2006-05-233-0/+1431
|
* patch #1493701: performance enhancements for struct moduleBob Ippolito2006-05-234-1295/+4
|
* revert #1493701Bob Ippolito2006-05-235-416/+276
|
* Remove duplicate itemAndrew M. Kuchling2006-05-231-3/+0
|
* Patch #1493701: performance enhancements for struct module.Bob Ippolito2006-05-235-276/+416
|
* Bug #1334662 / patch #1335972: int(string, base) wrong answers.Tim Peters2006-05-234-88/+262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In rare cases of strings specifying true values near sys.maxint, and oddball bases (not decimal or a power of 2), int(string, base) could deliver insane answers. This repairs all such problems, and also speeds string->int significantly. On my box, here are % speedups for decimal strings of various lengths: length speedup ------ ------- 1 12.4% 2 15.7% 3 20.6% 4 28.1% 5 33.2% 6 37.5% 7 41.9% 8 46.3% 9 51.2% 10 19.5% 11 19.9% 12 23.9% 13 23.7% 14 23.3% 15 24.9% 16 25.3% 17 28.3% 18 27.9% 19 35.7% Note that the difference between 9 and 10 is the difference between short and long Python ints on a 32-bit box. The patch doesn't actually do anything to speed conversion to long: the speedup is due to detecting "unsigned long" overflow more quickly. This is a bugfix candidate, but it's a non-trivial patch and it would be painful to separate the "bug fix" from the "speed up" parts.
* needforspeed: use append+reverse for rsplit, use "bloom filters" toFredrik Lundh2006-05-231-43/+101
| | | | | | | speed up splitlines and strip with charsets; etc. rsplit is now as fast as split in all our tests (reverse takes no time at all), and splitlines() is nearly as fast as a plain split("\n") in our tests. and we're not done yet... ;-)
* Update Misc/NEWS for gzip patch #1281707Bob Ippolito2006-05-231-2/+2
|
* Update Misc/NEWS for gzip patch #1281707Bob Ippolito2006-05-231-0/+2
|
* fix broken mergeRichard Jones2006-05-231-7/+2
|
* Applied patch 1337051 by Neal Norwitz, saving 4 ints on frame objects.Richard Jones2006-05-234-55/+54
|