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:
(Optionally) Reusing instances of FunctionArgs and EvaluationVisitors instead of creating new ones on each evaluation
Replacing ToLower calls on strings for case insensitive tests with Equals(, OrdinalIgnoreCase) calls
Also as a really minor one I replaced an empty array creation with reusing a single instance of it
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