4 ms·
So it sounds like the rules themselves aren't recursive, just your current strategy for evaluating them; is that correct? Given that, I'm more inclined towards
by DylanSp 3y ago
So it sounds like the rules themselves aren't recursive, just your current strategy for evaluating them; is that correct?
Given that, I'm more inclined towards the currently upvoted reply about translating them to JS/Lua and just calling eval(). [1] It'd be very simple and _should_ be fast enough, though you might need to worry a little bit about security (especially depending on whoever's providing the rule sets and how much validation there is around them).
[1] https://news.ycombinator.com/item?id=37136272 https://news.ycombinator.com/item?id=37136272