Repository navigation
Commit 4264ebd
Share the method's runtime cache with fake closures of the same scope
Creating a fake closure (Closure::fromCallable(), first-class callable
syntax, ReflectionMethod::getClosure()) over a method whose runtime
cache was not yet initialized allocated a cold per-closure heap cache
on every creation. Initialize the method's own shared cache instead -
exactly what the first real call would do - so repeated closure
creations reuse one warm cache. Trampolines and heap-cache functions
keep the per-closure path.1 parent df2090a commit 4264ebd
1 file changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
864 | 864 | | |
865 | 865 | | |
866 | 866 | | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
867 | 877 | | |
868 | 878 | | |
869 | 879 | | |
| |||
0 commit comments