sklose / NCalc2

expression evaluator for .NET with built-in compiler
MIT License
170 stars 58 forks source link

Allocation optimizations #58

Open Alloc86 opened 3 years ago

Alloc86 commented 3 years ago

As we're using NCalc in a Unity game where allocations are critical I added a few optimizations to reduce them a bit. Not sure if you'd like those to get adopted into mainline, especially the instance caching might not be thread safe.

Changes basically consist of two parts:

0001-Added-instance-caches.txt

Cheers, Chris