Commit c351440
fix(peg): use GC allocated slice instead of always alloca on stack
On big `or!()` templates stack size can grow pretty fast, specially when
recursion is done on similar templates and recursive tail call
optimizations are not possible.
For performance, LDC compiler already optimizes these calls into
stack-based variables when they are too small. Regardless, this library
heavily uses GC on the inner strings, so the impact is negligable.1 parent f12b0bd commit c351440
1 file changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1664 | 1664 | | |
1665 | 1665 | | |
1666 | 1666 | | |
1667 | | - | |
1668 | | - | |
1669 | | - | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
1670 | 1670 | | |
1671 | 1671 | | |
1672 | 1672 | | |
| |||
1858 | 1858 | | |
1859 | 1859 | | |
1860 | 1860 | | |
1861 | | - | |
1862 | | - | |
1863 | | - | |
| 1861 | + | |
| 1862 | + | |
| 1863 | + | |
1864 | 1864 | | |
1865 | 1865 | | |
1866 | 1866 | | |
| |||
0 commit comments