Guest User

Untitled

a guest
Sep 5th, 2013
63
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function UnitAura(unitId, index)
  2. end
  3.  
  4. local startTime, endTime
  5. startTime = os.clock()
  6. for j = 1, 1000000 do
  7.     local name, rank, icon, count, dispelType, duration, expires, caster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossDebuff, value1, value2, value3
  8.     for i = 1, 40 do
  9.         name, rank, icon, count, dispelType, duration, expires, caster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossDebuff, value1, value2, value3 = UnitAura("player", i)
  10.         name = 1
  11.         rank = 1
  12.         icon = 1
  13.         count = 1
  14.         dispelType = 1
  15.         duration = 1
  16.         expires = 1
  17.         caster = 1
  18.         isStealable = 1
  19.         shouldConsolidate = 1
  20.         spellID = 1
  21.         canApplyAura = 1
  22.         isBossDebuff = 1
  23.         value1 = 1
  24.         value2 = 1
  25.         value3 = 1
  26.     end
  27. end
  28. endTime = os.clock()
  29.  
  30. print(endTime-startTime)
  31.  
  32. startTime = os.clock()
  33. for j = 1, 1000000 do
  34.     for i = 1, 40 do
  35.         local name, rank, icon, count, dispelType, duration, expires, caster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossDebuff, value1, value2, value3 = UnitAura("player", i)
  36.        
  37.         name = 1
  38.         rank = 1
  39.         icon = 1
  40.         count = 1
  41.         dispelType = 1
  42.         duration = 1
  43.         expires = 1
  44.         caster = 1
  45.         isStealable = 1
  46.         shouldConsolidate = 1
  47.         spellID = 1
  48.         canApplyAura = 1
  49.         isBossDebuff = 1
  50.         value1 = 1
  51.         value2 = 1
  52.         value3 = 1
  53.     end
  54. end
  55. endTime = os.clock()
  56.  
  57. print(endTime-startTime)
  58.  
  59. startTime = os.clock()
  60. for j = 1, 1000000 do
  61.     for i = 1, 40 do
  62.         local name, rank, icon, count, dispelType, duration, expires, caster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossDebuff, value1, value2, value3
  63.         name, rank, icon, count, dispelType, duration, expires, caster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossDebuff, value1, value2, value3 = UnitAura("player", i)
  64.         name = 1
  65.         rank = 1
  66.         icon = 1
  67.         count = 1
  68.         dispelType = 1
  69.         duration = 1
  70.         expires = 1
  71.         caster = 1
  72.         isStealable = 1
  73.         shouldConsolidate = 1
  74.         spellID = 1
  75.         canApplyAura = 1
  76.         isBossDebuff = 1
  77.         value1 = 1
  78.         value2 = 1
  79.         value3 = 1
  80.  
  81.     end
  82. end
  83. endTime = os.clock()
  84.  
  85. print(endTime-startTime)
  86.  
  87. -- Reulsts
  88. --kagura@pc001 ~/lua
  89. --$ lua test2.lua
  90. --8.359
  91. --5.062
  92. --9.25
RAW Paste Data