diff options
| author | chai <chaifix@163.com> | 2021-11-15 11:54:17 +0800 |
|---|---|---|
| committer | chai <chaifix@163.com> | 2021-11-15 11:54:17 +0800 |
| commit | 30f2f46474bf4eda5f10d4c64a07cde01d469f66 (patch) | |
| tree | 6ff2ed3262037b3c9bae2d2b9059a1d65773f31c /Data/DefaultContent/Libraries/middleclass/performance/run.lua | |
| parent | 4c36bed53fe63ae6056730b3ecad2573f03d88f8 (diff) | |
*rename DefaultContent -> BuiltIn
Diffstat (limited to 'Data/DefaultContent/Libraries/middleclass/performance/run.lua')
| -rw-r--r-- | Data/DefaultContent/Libraries/middleclass/performance/run.lua | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/Data/DefaultContent/Libraries/middleclass/performance/run.lua b/Data/DefaultContent/Libraries/middleclass/performance/run.lua deleted file mode 100644 index 8d8ba47..0000000 --- a/Data/DefaultContent/Libraries/middleclass/performance/run.lua +++ /dev/null @@ -1,43 +0,0 @@ -local class = require 'middleclass' - -time = require 'performance/time' - -time('class creation', function() - local A = class('A') -end) - -local A = class('A') - -time('instance creation', function() - local a = A:new() -end) - -function A:foo() - return 1 -end - -local a = A:new() - -time('instance method invocation', function() - a:foo() -end) - -local B = class('B', A) - -local b = B:new() - -time('inherited method invocation', function() - b:foo() -end) - -function A.static:bar() - return 2 -end - -time('class method invocation', function() - A:bar() -end) - -time('inherited class method invocation', function() - B:bar() -end) |
