Message282983
| Author |
serhiy.storchaka |
| Recipients |
serhiy.storchaka, xiang.zhang |
| Date |
2016年12月12日.11:37:38 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1481542658.98.0.062656231101.issue28943@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
PyUnicode_KIND() just extracts three bits from the state word. PyUnicode_MAX_CHAR_VALUE() extracts bits multiple times and does few conditional branching. I think it is much slower that PyUnicode_KIND(). In common case you search ASCII needle or the needle of the same kind as a string, therefore checking for fast path just adds the overhead. It is appropriate while the overhead is tiny.
Optimize common cases, not rare and obscure cases. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2016年12月12日 11:37:39 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, xiang.zhang |
| 2016年12月12日 11:37:38 | serhiy.storchaka | set | messageid: <1481542658.98.0.062656231101.issue28943@psf.upfronthosting.co.za> |
| 2016年12月12日 11:37:38 | serhiy.storchaka | link | issue28943 messages |
| 2016年12月12日 11:37:38 | serhiy.storchaka | create |
|