Favor filtering of functions during dispatch over exceptions to determine appropriate function to call. Results in approximately 50% reduction in runtime for long running scripts

This commit is contained in:
Jason Turner
2009-08-06 04:22:13 +00:00
parent 0ff107a818
commit a3d4b6698a
3 changed files with 96 additions and 28 deletions

View File

@@ -94,6 +94,11 @@ namespace chaiscript
return std::vector<Type_Info>();
}
virtual int get_arity() const
{
return -1;
}
virtual bool call_match(const std::vector<Boxed_Value> &vals) const
{
typedef std::vector<std::pair<std::string, Proxy_Function > > function_vec;