ClearScript icon indicating copy to clipboard operation
ClearScript copied to clipboard

Eliminate lambdas from Invoke calls

Open AnsisMalins opened this issue 11 months ago • 1 comments

This change gets rid of allocations in Invoke and InvokeNoThrow calls. Each allocation is not much, but these functions get called a lot, and it adds up.

AnsisMalins avatar Feb 19 '25 19:02 AnsisMalins

Hi @AnsisMalins,

Thanks for posting your PR, but, as before, your change is redundant and/or in conflict with the upcoming ClearScript 7.5, which implements a number of strategies to reduce or eliminate heap allocation. Specifically, the new version replaces nearly all capturing lambdas in the codebase with static lambdas and most heap-allocated scope objects with ref struct scopes.

Thanks again!

ClearScriptLib avatar Feb 20 '25 13:02 ClearScriptLib