Commit 78b6780
committed
Micro-optimization of to_rgba_array.
Avoid having to compute a repr of the entire array whenever calling
to_rgba_array with an array input (that repr would be generated when the
call to to_rgba fails and needs to generate an error message; instead,
first check whether the input is already an array). See comments for
detail.
Slightly improves the performance of wire3d_animation on mpl_cairo.1 parent bcc2f12 commit 78b6780
1 file changed
Lines changed: 10 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | 215 | | |
223 | 216 | | |
224 | 217 | | |
| |||
234 | 227 | | |
235 | 228 | | |
236 | 229 | | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
237 | 240 | | |
238 | 241 | | |
239 | 242 | | |
| |||
0 commit comments