Issue 7607: stringlib fastsearch could be improved on 64-bit builds (original) (raw)
Issue7607
This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
This issue has been migrated to GitHub: https://github.com/python/cpython/issues/51856
classification
Title: | stringlib fastsearch could be improved on 64-bit builds | ||
---|---|---|---|
Type: | performance | Stage: | |
Components: | Interpreter Core | Versions: | Python 3.2, Python 2.7 |
process
Status: | closed | Resolution: | out of date |
---|---|---|---|
Dependencies: | Superseder: | [patch] improve unicode methods: split() rsplit() and replace() View:7622 | |
Assigned To: | Nosy List: | flox, giampaolo.rodola, pitrou | |
Priority: | normal | Keywords: |
Created on 2009-12-30 22:23 by pitrou, last changed 2022-04-11 14:56 by admin. This issue is now closed.
Messages (3) | ||
---|---|---|
msg97065 - (view) | Author: Antoine Pitrou (pitrou) * ![]() |
Date: 2009-12-30 22:23 |
The fastsearch algorithm uses a 32-bit mask for the boyer-moore compression table but stores it as a long. Since longs can be wider than 32 bits on some platforms (especially, most 64-bit Unixes), the actual mask width could be platform-dependant so as to improve the efficiency of the algorithm. Using the SIZEOF_LONG constant would probably do the trick. | ||
msg97163 - (view) | Author: Florent Xicluna (flox) * ![]() |
Date: 2010-01-03 13:47 |
Another place where this optimization will apply: "Objects/unicodeobject.c" for the bloom filters: #define BLOOM(mask, ch) ((mask & (1 << ((ch) & 0x1F)))) | ||
msg97479 - (view) | Author: Florent Xicluna (flox) * ![]() |
Date: 2010-01-09 23:51 |
Proposed in the patch for issue #7622. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:56:55 | admin | set | github: 51856 |
2010-01-13 08:11:07 | pitrou | set | status: open -> closedresolution: out of date |
2010-01-09 23:51:24 | flox | set | superseder: [patch] improve unicode methods: split() rsplit() and replace()messages: + stage: needs patch -> |
2010-01-03 13:47:35 | flox | set | messages: + |
2010-01-03 13:08:18 | giampaolo.rodola | set | nosy: + giampaolo.rodola |
2009-12-30 22:23:17 | pitrou | create |