This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bench' --https://github.com/SuperiorServers/dash/blob/master/lua/dash/libraries/bench.lua | |
function table.Select (tblMaster, bfuncCheck) | |
local tblLocal = {} | |
for k, v in pairs (tblMaster) do | |
if bfuncCheck (v) then | |
if type (k) != "number" then | |
tblLocal[k] = v | |
else | |
tblLocal[#tblLocal + 1] = v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local matrices = {} | |
local len = 0.1 | |
local step = 0.2 | |
for x = -len, len, step do | |
for y = -len, len, step do | |
for z = -len, len, step do | |
matrices[#matrices + 1] = Matrix() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'xbench' -- https://github.com/SuperiorServers/plib_v2/blob/master/lua/plib/libraries/xbench.lua | |
local t = {} | |
for i = 1, 128 do | |
t[i] = Entity(1) | |
end | |
xbench.Compare({ | |
Pairs = function() | |
for k, v in pairs(t) do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'pbench' --https://github.com/SuperiorServers/plib_v2/blob/master/lua/plib/libraries/pbench.lua | |
local players = {} | |
for i =1, 100 do | |
players[i] = Entity(1) | |
players[i].GetUserGroup = function() | |
return (i > 50) | |
end | |
end |