Message186044
> Marc-Andre Lemburg added the comment:
> Same here. The heuristic may work for short strings that easily fit
> into the CPU cache, but as soon as you use it on longer strings,
> this will result in much slower comparisons.
When testing both, would it help to test the end of the string before the beginning? I'd expect that be more likely to leave the beginning in the cache for any subsequent memcmp() call. |
|
Date |
User |
Action |
Args |
2013-04-04 17:00:13 | eric.snow | set | recipients:
+ eric.snow, lemburg, pitrou, vstinner, serhiy.storchaka |
2013-04-04 17:00:13 | eric.snow | set | messageid: <1365094813.48.0.21403965853.issue17628@psf.upfronthosting.co.za> |
2013-04-04 17:00:13 | eric.snow | link | issue17628 messages |
2013-04-04 17:00:13 | eric.snow | create | |
|