Commit 769ff09
Minor optimization for url_quote (#1085)
* Minor optimization for url_quote
Since we're working with bytes here anyway, there's no need to use
strings and encode. This yields ~9% performance gain with python3 and
~23% performance gain with python2.
* Further improve url_quote performance
This variant fixes compatibility with python <=3.4 and yields
additional performance improvement (total 50% with python 2, 22% with python 3)1 parent 5791ced commit 769ff09
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
| |||
471 | 474 | | |
472 | 475 | | |
473 | 476 | | |
474 | | - | |
| 477 | + | |
475 | 478 | | |
476 | 479 | | |
477 | 480 | | |
| |||
0 commit comments