Decrease compile times by 30% and runtimes by 10% by eliminating use of boost::bind during function dispatch

This commit is contained in:
Jason Turner
2009-09-10 03:44:42 +00:00
parent f23f0edc70
commit f369afed77
5 changed files with 92 additions and 67 deletions

View File

@@ -75,7 +75,8 @@ namespace chaiscript
{
public:
Dispatch_Function(const std::vector<std::pair<std::string, Proxy_Function > > &t_funcs)
: m_funcs(t_funcs)
: Proxy_Function_Base(std::vector<Type_Info>()),
m_funcs(t_funcs)
{
}
@@ -91,11 +92,6 @@ namespace chaiscript
return dispatch(m_funcs.begin(), m_funcs.end(), params);
}
virtual std::vector<Type_Info> get_param_types() const
{
return std::vector<Type_Info>();
}
virtual int get_arity() const
{
return -1;