Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Get KnowHOWs to publish a method cache. ~25% performance improvement …
…in 'loop up to 1 thousand' benchmark. jnthn++
  • Loading branch information
diakopter committed Nov 13, 2011
1 parent 0f6bf67 commit a74f3fa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lua/runtime/Metamodel/KnowHOW/KnowHOWBootstrapper.lua
Expand Up @@ -57,7 +57,10 @@ function KnowHOWBootstrapper.Bootstrap ()
end);
KnowHOWMeths.compose = CodeObjectUtility.WrapNativeMethod(
function (TC, Ignored, Cap)
return CaptureHelper.GetPositional(Cap, 2);
local HOW = CaptureHelper.GetPositional(Cap, 1);
local Obj = CaptureHelper.GetPositional(Cap, 2);
Obj.STable.MethodCache = HOW.Methods;
return Obj;
end);
KnowHOWMeths.attributes = CodeObjectUtility.WrapNativeMethod(
function (TC, Ignored, Cap)
Expand Down

0 comments on commit a74f3fa

Please sign in to comment.