The Variant class is now meant to be used on the stack instead of allocated on the heap. As a result (and because of related changes), performance of Channels has roughly doubled when pushing and popping most types.

This commit is contained in:
Alex Szpakowski
2016-02-14 16:39:32 -04:00
parent 7995e6ba85
commit 23fcaec89f
13 changed files with 287 additions and 321 deletions
+3 -6
View File
@@ -95,14 +95,11 @@ int w_clear(lua_State *)
int w_quit(lua_State *L)
{
std::vector<StrongRef<Variant>> args;
std::vector<Variant> args;
Variant *v = Variant::fromLua(L, 1);
if (v)
{
Variant v;
if (Variant::fromLua(L, 1, &v))
args.push_back(v);
v->release();
}
Message *m = new Message("quit", args);
instance()->push(m);