Commit e95ae6a
committed
filter: lua: preallocate the next function
Reduce allocation from 4 to 2 by preallocating the lua function
which is a wrapper to the Go 'next' function we receive.
name old time/op new time/op delta
LUAProcess-8 559ns ± 6% 459ns ± 7% -17.97% (p=0.000 n=10+10)
name old alloc/op new alloc/op delta
LUAProcess-8 104B ± 0% 24B ± 0% -76.92% (p=0.000 n=10+10)
name old allocs/op new allocs/op delta
LUAProcess-8 4.00 ± 0% 2.00 ± 0% -50.00% (p=0.000 n=10+10)1 parent cc9244b commit e95ae6a
1 file changed
+13
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
51 | 59 | | |
52 | 60 | | |
53 | 61 | | |
| |||
56 | 64 | | |
57 | 65 | | |
58 | 66 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
68 | 74 | | |
69 | 75 | | |
70 | 76 | | |
71 | 77 | | |
72 | | - | |
73 | | - | |
| 78 | + | |
74 | 79 | | |
75 | 80 | | |
76 | 81 | | |
| |||
0 commit comments