Closed vendethiel closed 6 years ago
Yes, that's the idea, wipe should be faster than creating a new table because it reuses the memory that was already allocated, and you want to avoid allocations in functions called frequently to prevent excessive garbage collection.
Okay, that's about what I was thinking. Just wanted to make sure, ty for the fast answer.
@slaren asking you here.
I'm trying to optimize a bit the addon, and I stumbled upon this in modules/cooldowns.lua
What's the point of wiping the spell list instead of just using a local table? Does it save some allocations maybe, because the table's backing array (in C parlance) is not reset?