Guest User

lua Arm Hack Bench

a guest
Oct 4th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.58 KB | None | 0 0
  1. lua bench try# count
  2.  
  3. bmk0 1 6928591
  4. bmk0 2 6922258
  5. bmk0 3 6921824
  6. bmk0 4 6921227
  7. bmk0 5 6921488
  8. a 6923077
  9.  
  10. bmk1 1 21217
  11. bmk1 2 21198
  12. bmk1 3 21197
  13. bmk1 4 21197
  14. bmk1 5 21252
  15. a 21200
  16.  
  17. bmk2 1 1639861
  18. bmk2 2 1639804
  19. bmk2 3 1639842
  20. bmk2 4 1639730
  21. bmk2 5 1639830
  22. a 1639814
  23. =============================================================================
  24. ARM Hack
  25. lua bench try# count
  26.  
  27. bmk0 1 6930328
  28. bmk0 2 6937580
  29. bmk0 3 6930355
  30. bmk0 4 6929856
  31. bmk0 5 6929918
  32. a 6931607
  33.  
  34. bmk1 1 21432
  35. bmk1 2 21425
  36. bmk1 3 21337
  37. bmk1 4 21432
  38. bmk1 5 21339
  39. a 21393
  40.  
  41.  
  42. bmk2 1 1666351
  43. bmk2 2 1666634
  44. bmk2 3 1666469
  45. bmk2 4 1666403
  46. bmk2 5 1666522
  47. a 1666475
  48.  
  49. bmk0:
  50. local tick_total = 3000 --30 seconds
  51. local tick = rb.current_tick()
  52. local tick_end = tick + tick_total
  53. local i = 0
  54.  
  55. repeat
  56. i = i + 1
  57.  
  58. until rb.current_tick() >= tick_end
  59.  
  60. rb.splash(500, i .. " in " .. tick_total .. " ticks")
  61.  
  62. bmk1:
  63. if rb.cpu_boost then rb.cpu_boost(true) end
  64. rb.lcd_putsxy(1, 1, "Test")
  65. rb.lcd_update()
  66. local tick_total = 3000 --30 seconds
  67. local tick = rb.current_tick()
  68. local tick_end = tick + tick_total
  69. local i = 0
  70.  
  71. repeat
  72. i = i + 1
  73. math.randomseed(0)
  74.  
  75. if rb.audio("status") == 4 then
  76. os.exit(1)
  77. elseif math.random(2,3) == 0 then
  78. os.exit(2)
  79. elseif not rb.battery_level_safe() then
  80. os.exit(3)
  81. elseif not rb.dir_exists("/") then
  82. os.exit(4)
  83. elseif rb.file_exists("/" .. i .."test.000") then
  84. os.exit(5)
  85. elseif rb.current_path() == "" then
  86. os.exit(6)
  87. elseif rb.strchr(i .. "testing" .. i, string.byte("t")) ~= "testing" .. i then
  88. os.exit(7)
  89. elseif rb.strrchr(i .. "testing" .. i, string.byte("t")) ~= "ting" .. i then
  90. os.exit(8)
  91. elseif rb.button_queue_count() > 10 then
  92. os.exit(9)
  93. else
  94. rb.button_clear_queue()
  95. rb.lcd_putsxy(1, 1, "Loop " .. i)
  96. rb.lcd_update()
  97. end
  98.  
  99. until rb.current_tick() >= tick_end
  100. rb.lcd_putsxy(1, 1, "Done " .. i)
  101. rb.lcd_update()
  102. rb.splash(1000, i .. " in " .. tick_total .. " ticks")
  103. if rb.cpu_boost then rb.cpu_boost(false) end
  104.  
  105.  
  106.  
  107. bmk2:
  108. local tick_total = 3000 --30 seconds
  109. local tick = rb.current_tick()
  110. local tick_end = tick + tick_total
  111. local i = 0
  112.  
  113. local s = ""
  114. repeat
  115. i = i + 1
  116. s = s .. "1"
  117. if tonumber(s) > 1111111111 then s = "" end
  118. until rb.current_tick() >= tick_end
  119.  
  120. rb.splash(500, i .. " in " .. tick_total .. " ticks")
  121.  
  122. =============================================================================
  123. bmk0% difference 0.123%
  124.  
  125. bmk1% difference 0.91%
  126.  
  127. bmk2% difference 1.61%
Add Comment
Please, Sign In to add comment