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 2010-01-13 08:11 by pitrou. This issue is now closed.

Messages (3)
msg97065 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) 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) * (Python committer) 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) * (Python committer) Date: 2010-01-09 23:51
Proposed in the patch for issue #7622.
History
Date User Action Args
2010-01-13 08:11:07pitrousetstatus: open -> closed
resolution: out of date
2010-01-09 23:51:24floxsetsuperseder: [patch] improve unicode methods: split() rsplit() and replace()
messages: + msg97479
stage: needs patch ->
2010-01-03 13:47:35floxsetmessages: + msg97163
2010-01-03 13:08:18giampaolo.rodolasetnosy: + giampaolo.rodola
2009-12-30 22:23:17pitroucreate