This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Konlab's profile picture

Table of booleans vs number

Started by Konlab, 18 October 2015 - 07:13 AM
Konlab #1
Posted 18 October 2015 - 09:13 AM
Using a table of booleans like an int type is faster or using numbers is faster?
(Execution time)
Creator #2
Posted 18 October 2015 - 09:35 AM
What exactly do you mean?
How do you use a tale of bools like an int?
I think using numbers is faster.
Bomb Bloke #3
Posted 18 October 2015 - 09:54 AM
A number-type would be considerably faster than a table populated with booleans for every use case I can think of where you'd want to represent ints. It'd consume less RAM, too.