Commit dbd7186
committed
uri: Optimize
Currently the `php_uri_get_*()` functions call into `php_uri_get_property()`
with a constant `php_uri_property_name`. This name will then be used to look up
the correct property handler by a function in a different compilation unit.
Improve this by making `uri_property_handler_from_internal_uri` take a
`php_uri_parser` rather than a `uri_internal_t`, defining it in a header as
inlinable (and renaming it to better match its updated purpose).
This allows the compiler to fully inline `php_uri_get_property()`, such that no
dynamic lookups will need to happen.php_uri_get_*()
1 parent d158e32 commit dbd7186
3 files changed
+27
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
128 | 128 | | |
129 | | - | |
| 129 | + | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | 22 | | |
46 | 23 | | |
47 | 24 | | |
| |||
72 | 49 | | |
73 | 50 | | |
74 | 51 | | |
75 | | - | |
| 52 | + | |
76 | 53 | | |
77 | 54 | | |
78 | 55 | | |
| |||
95 | 72 | | |
96 | 73 | | |
97 | 74 | | |
98 | | - | |
| 75 | + | |
99 | 76 | | |
100 | 77 | | |
101 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
170 | 192 | | |
171 | 193 | | |
172 | 194 | | |
| |||
0 commit comments