Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Commit60e1ce5
committed
Simplify definition of mathtext symbols.
Use a single regex that handles both single_symbol (a single character)and symbol_name (`\knowntexsymbolname`), and also slightly simplify the"end-of-symbol-name" regex.This parsing element comes up extremely often, and removing oneindirection layers shaves off ~3-4% off drawing all the current mathtexttests, i.e.```MPLBACKEND=agg python -c 'import time; from pylab import *; from matplotlib.tests.test_mathtext import math_tests; fig = figure(figsize=(3, 10)); fig.text(0, 0, "\n".join(filter(None, math_tests)), size=6); start = time.perf_counter(); [fig.canvas.draw() for _ in range(10)]; print((time.perf_counter() - start) / 10)'```1 parent7c19d85 commit60e1ce5
1 file changed
+7
-8
lines changedLines changed: 7 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
| 11 | + | |
11 | 12 |
| |
12 | 13 |
| |
13 | 14 |
| |
| |||
1710 | 1711 |
| |
1711 | 1712 |
| |
1712 | 1713 |
| |
1713 |
| - | |
1714 |
| - | |
1715 |
| - | |
1716 |
| - | |
1717 | 1714 |
| |
1718 |
| - | |
1719 |
| - | |
1720 |
| - | |
1721 |
| - | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
1722 | 1721 |
| |
1723 | 1722 |
| |
1724 | 1723 |
| |
|
0 commit comments
Comments
(0)